Mailing in php

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

Ratzzak
Forum Newbie
Posts: 21
Joined: Sat Jun 13, 2009 10:56 am

Re: Mailing in php

Post by Ratzzak »

Thanx a lot Mike.

'll install Mercury mail and 'll try it.
Hope everything works fine this time. :)
User avatar
turbolemon
Forum Commoner
Posts: 70
Joined: Tue Jul 14, 2009 6:45 am
Location: Preston, UK

Re: Mailing in php

Post by turbolemon »

The script if failing when you are calling $mail->send() which means that one of the function calls in that library is failing. This could be due to configuration or it could be that your local server lacks a prerequisite module? Weird how it's not giving an error message, but I had similar problems when working with the GD library silent-failing (though that was because of error-suppression using @).

Add error_reporting(E_ALL); to the start of your script to make sure that every type of error is displayed, including notices which may help identify potential problems. (sorry @jackpf ;))

This bug could be relevant: http://sourceforge.net/tracker/index.ph ... tid=385707.

As it specifies, add $mail->IsSMTP(); to your code just to make sure that the function is using the SMTP settings and not the default mail() function settings. After reviewing the code, it seems that if you don't have this line in there it defaults to not using SMTP, regardless of the SMTP settings added.
Post Reply