PHPmailer- outlook not receiving emails when including image

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

Post Reply
lox
Forum Newbie
Posts: 5
Joined: Sun Apr 06, 2008 11:59 pm

PHPmailer- outlook not receiving emails when including image

Post 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?
lox
Forum Newbie
Posts: 5
Joined: Sun Apr 06, 2008 11:59 pm

Re: PHPmailer- outlook not receiving emails when including image

Post by lox »

Bump? Would appreciate some help with this- I have been trying to fix this for a number of days now.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: PHPmailer- outlook not receiving emails when including image

Post 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/
lox
Forum Newbie
Posts: 5
Joined: Sun Apr 06, 2008 11:59 pm

Re: PHPmailer- outlook not receiving emails when including image

Post 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.
Post Reply