Hi!
i want to send email like a webpage should have Image at the top of the body please help me that how this will be possible.
thanking you
send email like a webpage should have Image at the top
Moderator: General Moderators
-
shafiq2626
- Forum Commoner
- Posts: 88
- Joined: Wed Mar 04, 2009 1:54 am
- Location: Lahore
- Contact:
Re: send email like a webpage should have Image at the top
Are you saying you want to send an HTML email? if so, you can set the content-type to text/html
Code: Select all
$to="person@mail.com";
$subject="Hello";
$body="<img src='http://you.com/image.jpg' />Hi"; //the image is in here (from a remote site)
$headers ="From:you@yourmail.com\r\n";
$headers . ="Content-type:text/html"; //render HTML tags
mail($to,$subject,$body,$headers);
Re: send email like a webpage should have Image at the top
Hi,
it's depends on where do you want to have image stored. You can put it on server ... So you can use classical html <img /> element or you can have these in the attachement ... example is here.
Hint: I have a bad experience with a putting images into an attachement. The problem is in mail clients which are not able to display images properly. If you place images on some server it will work every time but the annoying message about external images is displayed before the downloading.
For sending emails use PHPMailer package:
http://www.askapache.com/php/phpfreaks- ... orial.html
it's depends on where do you want to have image stored. You can put it on server ... So you can use classical html <img /> element or you can have these in the attachement ... example is here.
Hint: I have a bad experience with a putting images into an attachement. The problem is in mail clients which are not able to display images properly. If you place images on some server it will work every time but the annoying message about external images is displayed before the downloading.
For sending emails use PHPMailer package:
http://www.askapache.com/php/phpfreaks- ... orial.html