That does indeed work... and I have also tried the normal Mail function... but the issue I then get is that although the sender shows in the list of message in Outlook as the name I want it to, the preview (and message if fully opened) says it's from "nobody" (then my ISP's server address, then "on behalf of.... my address") which looks a little unprofessional. My ISP says that this is a security feature so that "from" addresses are not spoofed, and fair enough too, but it's annoying!
If i can get PHPMailer to work, I assume that it doesn't do the "on behalf of" because it has the email account login details to hand?
My site will be sending various mails back to the office, so I'm not worried about it in this case, but when auto-emailing customers it would look a bit shoddy... any way round it?
Thanks
DC
Main Topics
Browse All Topics





by: RWJDComPosted on 2006-07-23 at 20:40:19ID: 17165216
Do you really need to use the SMTP server or can you use the systems internal mail function? The problem is with the way PHPMailer is connecting to the SMTP server. I knew that a lot of my systems use PHPMailer but I stick to using the servers 'mail' function to send the mail with PHPMAiler.
Try changing...
$mail->IsSMTP(); // set mailer to use SMTP
to
$mail->Mailer = "mail";
It will cause your script to work perfectly with the way that it is written using the systems internal mail function with PHPMailers features.