Jump to content
xisto Community
Sign in to follow this  
wappy

Help With Mail And Attachments Help on mail attachments

Recommended Posts

Hi, can someone please give me an example of how to send a zip or other filetype as an attachment using the mail() command?Im also interested in sending to mail email address, for example i have a .txt file full of email addy's like:mail1@blah.netmail2@blah.netmail3@blah.nethow can i send the file and or mail to all these addy's in one go? Mmm..

Share this post


Link to post
Share on other sites

http://us3.php.net/manual/en/function.mail.php Informs you how for multiple contacts:

 

Parameters

to

 

????[/tab]Receiver, or receivers of the mail.

 

????The formatting of this string must comply with RFC 2822. Some examples are:

 

????user@example.com

????user@example.com, anotheruser@example.com

????User <user@example.com>

[tab]User <user@example.com>, Another User <anotheruser@example.com>

Edited by truefusion (see edit history)

Share this post


Link to post
Share on other sites

To send an attachment, I think you need to send a different Header and/or Mime -type to allow for the attachment. The different Header is "multi-part", I think.
Reference the php.net site from the last posting for the details and particulars.
Or here is a link to a Tutorial posted over at Xisto ( a sister Forum to the Xisto ).
http://forums.xisto.com/topic/90466-using-the-php-mail-function-for-images-or-attachments-cant-find-a-decent-tutorial/
I hope this will help you solve the problem.

Share this post


Link to post
Share on other sites

what yo do is make a ZIP folder, left click and go to New than new compressed zip folder. put whatever files you need to put there, you can just drag them there. to rename the zip folder, right click and click rename than jsut type the name.. i duno if u have the .zip thing, but it hink it comes with all computers now. or you can download winrar, i think you can do it with that one to. than you go to your email, click add attachments, than browse than find the location of the folder, click on it, click open, than click upload on the site, wait for it.. and than jsut type the email address or message that you need to type. very easy!

Share this post


Link to post
Share on other sites

mail header with attachment is different ,
You can send many email with mail()
so example :

mail ("mail1@mail.com,mail2@mail.com,mail3@mail.com","Text subject" ,"body text");

i think if you want send attachment you must know file type and more
if you dont find source for attach file you can paste file address in email body
its easy , some users dont like open mail attachment
but if you type some tip in body and then type url of file users download it better

Sorry my en is not ver well

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.