tags:

views:

34

answers:

2

hi i want to send a image in html format using php mailer class but image show in mail after downloading. but i want to display the image without downloading. is there any option in mailer class or there is another method for this. or i have to send the the image in anoher format. thnks in advance

+1  A: 

Well, there can be only two possible answers:

  • you do not want to embed the actual image file with the eMail, then simply put an <img> element into the eMail linking to the image at the remote location, just like you would with any other HTML page. Then cross fingers and hope the client has HTML email enabled and allows display of remote images.

or

Gordon
A: 

If your using PHP Mailer...

$mail = new PHPMailer();    
$mail->SetFrom("[email protected]");
$mail->AddAddress("[email protected]");
$mail->Subject = "Blah"
$mail->MsgHTML('<html><body><img src="logo.jpg">Hello</body></html>');
$mail->AddAttachment("logo.jpg");
$mail->Send();

Using AddAttachment PHP Mailer will check your HTML for a reference to that file and automatically embed it for you.

fire