Page 1 of 1

PHPmailer- outlook not receiving emails when including image

Posted: Mon Apr 07, 2008 12:07 am
by lox
Hello,

I am using phpmailer. I have html in the email including links to some images to include in there. Hotmail will display the images no problems however outlook is blocking the emails completely. I have included an AltBody but it won't receive that either (I think its not even registering the AltBody because it is able to generate some of the html).

This is the error that it throws in outlook:

Task 'the@email.com'- Receiving' reported error (0x800CCC90) : 'Your incoming (POP3) e-mail server has reported an internal error. If you continue to receive this message, contact your server administrator or Internet service provider (ISP). The server responded: .'

If I remove the image tags from the html code the email is received by the outlook client with no issues.

Here is my code:

Code: Select all

$mail = new PHPMailer();
    $mail->IsSMTP(); 
    $mail->Host = $mailHost; 
    $mail->SMTPAuth = true; 
    $mail->Username = $mailUsername;
    $mail->Password = $mailPassword; 
     
    $mail->From = $fromAddress; 
    $mail->FromName = $fromName;     
    $mail->AddAddress($toAddress, $toName); 
     
    $mail->Subject = $subject; 
    $mail->Body  = $body;
    $mail->AltBody = strip_tags($body);
     
    if(!$mail->Send()) 
    { 
       echo "Message could not be sent."; 
       echo "Mailer Error: " . $mail->ErrorInfo; 
       exit; 
    }
Anyone know what the issue is here?

Re: PHPmailer- outlook not receiving emails when including image

Posted: Mon Apr 07, 2008 9:06 pm
by lox
Bump? Would appreciate some help with this- I have been trying to fix this for a number of days now.

Re: PHPmailer- outlook not receiving emails when including image

Posted: Mon Apr 07, 2008 9:53 pm
by Chris Corbyn
Looks to me like the bug is with the mail server and not with your code. Weird how it's dumping out what looks to be a memory address. Because it only happens when <img> tags are present I suspect it's a bug with the spam checker to mail server uses.

On the off-chance the bug is in PHPMailer, try Swift Mailer and see if the problem goes away:

http://swiftmailer.org/

Re: PHPmailer- outlook not receiving emails when including image

Posted: Mon Apr 07, 2008 10:01 pm
by lox
Cool thanks mate,

I've been in touch with the provider to see if they think its a bug on their end. If I get no joy from them I'll go with swiftmailer.