Thursday, December 30, 2010

PHP: Send Mail with Attachments using Local Mail Server

I have modified some codes from the forums for sending email with attachments using local mail server. This script is tested with Gmail and Hotmail. Both mail servers are able to receive the emails.

However, when I include the attachments in the sending mail, Hotmail accounts are unable to receive them. As for Gmail accounts, there are no problems at all.

I am still trying to find out why Hotmail is unable to receive the attachments. If anyone knows how to solve the problem, do let me know. 



You can download the PHP files for the class here and the class tester here.
Alternatively you can visit my website here.


As usual, here are some snapshots of the output and the code:


1. Message received by Gmail.


2. Message output from server.










Codes:





























No comments:

Post a Comment