send attachment ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
myharshdesigner
Forum Commoner
Posts: 43
Joined: Sat Apr 21, 2007 8:23 pm

send attachment ?

Post by myharshdesigner »

Hello sir,

i want to send attachment through

Code: Select all

mail()
function.

So pl tell me the the code what should i right or which method will transfer attachment through

Code: Select all

mail()
function .

Waiting for your help
Thanks
Harsh
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Save the trouble by using SwiftMailer.
myharshdesigner
Forum Commoner
Posts: 43
Joined: Sat Apr 21, 2007 8:23 pm

Post by myharshdesigner »

anjanesh wrote:Save the trouble by using SwiftMailer.
thanks for your reply if i want to do it with only with

Code: Select all

mail()
Function then

because i have to look and learn how to work on swiftmailer & i don't have much time for that right now i have to complete this code today.

i have install xampp

i want to do it with ought installing any extra package.

So can i do it ?

i am new in php

thanks
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Believe me you'll end up spending more time debugging using the mail() function.

Just use SwiftMailer, because its all there and so are the examples - 15 mins task tops.
myharshdesigner
Forum Commoner
Posts: 43
Joined: Sat Apr 21, 2007 8:23 pm

Post by myharshdesigner »

anjanesh wrote:Believe me you'll end up spending more time debugging using the mail() function.

Just use SwiftMailer, because its all there and so are the examples - 15 mins task tops.
Thanks sir thanks for your help

now can u tell me how to install or how to use send mail.

because for using sendmail i ahve to install it na 1st ?
so pl also tel me that.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

AOL Speak

Post by feyd »

myharshdesigner, I've asked on a number of occasions for you to start complying with our rules. You have yet to comply. Your ability to post may soon be compromised if you do not cease breaking the rules. In this thread alone you have used "u" and "pl" along with misspelling several other simple words.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

myharshdesigner wrote:now can u tell me how to install or how to use send mail.

because for using sendmail i ahve to install it na 1st ?
so pl also tel me that.
"Send mail" or are you referring to Sendmail ?

Either way, using native mail() function to send attachments requires far more work. Do check the comments in mail manual.

Also, check out these 2 articles at phpbuilder.com:
http://www.phpbuilder.com/columns/karti ... hp3?aid=69
http://www.phpbuilder.com/columns/jason ... p3?aid=883
Post Reply