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
- you dont want to reference the file from a remote server, but embed it with the eMail. In that case, refer to How To Embed Images in HTML EMail or Attaching an image to an email
Gordon
2010-08-20 08:56:33
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
2010-08-20 09:53:53