Jump to content

How to format email message with web page displayed when recieved.


ron814

Recommended Posts

Hello I would like to know how to create an email message with web page displayed and all its links are able when the email message received.

 

below here im using php mailer to send email message but i want to send plain text and webpage displayed/embed.

 

require_once('class.phpmailer.php');

$message = $_POST['msg'];

$subject = $_POST['subject'];

$body = "<table><tr><td>$message</td></tr></table>";

$mail = new PHPMailer();

$mail->AddAddress('test@yahoo.com');

$mail->SetFrom('myemail@yahoo.com');

$mail->Subject = $subject;

$mail->MsgHTML($body);

$mail->Send();

 

I would be greatfull for your help.

Link to comment
Share on other sites

What if I want to view the whole website page in the email message. What tag should I use?

 

It would have to be an HTML formatted email, not a plain text email, then you can simply use the regular <img> tags for the image.

 

 

 

Link to comment
Share on other sites

Email and webpages are different things. You can't just embed a webpage in an email (well you could, but it won't look right on most mail clients). You generally need to re-code the entire web page to be able to view it.

 

Email clients are generally like browsers were about 8-10 years ago. Tables, inline CSS, and not a lot of cross-client support for CSS.

 

The short answer to your problem is that you can't really do what you want.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.