...

View Full Version : Email Questions



dlg0351
03-29-2005, 02:41 PM
Not sure where to post this question or if it is has a place in the forum. I got am email today from bluefly.com (an online clothing store) and the email looked like a webpage, it had several graphics with different links and text that looked formatted with a styel sheet. There weren't any attachments, so I am not sure how the email was made. Any idea how I can make an email like this? Can it be down with web email like hotmail or yahoo?

JamieR
03-29-2005, 03:06 PM
You have to create the email in a table structure and then include the images as absolute urls from a webserver.

dlg0351
03-29-2005, 03:17 PM
Table structure as in html table structure, like:

<table>
<tr>
<td></td>
</tr>
</table>

JamieR
03-29-2005, 03:20 PM
Yeh something like that. Only reason I say that is that I pasted the contents of a email from ebay into dreamweaver's design view, then looked at the code and it was a table.

~Jamie.

dlg0351
03-29-2005, 03:27 PM
I just tried that and it didn't work, just the text showed up. I tried sending it "in HTML only" and that didn't work.

I tried it with and without the <html></html> tags and the <body></body> tags.

Any other suggestions?

dannyhayes
03-29-2005, 03:28 PM
Hi,

You are right weazel you do use a table structure and get the images from a webserver. You can also use most html in a email.

JamieR
03-29-2005, 03:38 PM
Well from thunderbird, I pasted the contents of a email from ebya into a new dreamweaver document and I got this:



<div class="moz-text-html" lang="x-western" xml:lang="x-western">
<table cellpadding="0" cellspacing="0" width="600">
<tbody>
<tr>



...no <table> opening tag, but a </table> closing tag.

dlg0351
03-29-2005, 03:39 PM
Can you post and example? I am having trouble getting it to work.

JamieR
03-29-2005, 03:51 PM
Yeh OK, I've attached a .txt file which contains the edited html tables contents of an email that ebay sent me..only the code is there.

requestcode
03-29-2005, 06:12 PM
You will need to use a server side language such as PHP or Perl to do that. Try searching the server side forums for examples.
Here is an example using PHP and sendmail:


$announce_to_email = "myemail@mail.com";
$body="<html><head><title>Help Desk Survey Results</title>";
$body.="<style type='text/css'>\nBODY {background-color:#FFFFCC;font-family:Verdana;font-size:12;font-weight:bold}\nSPAN {color:blue;}\n</style>";
$body.="</head><body>";
$body.="The following are answers to a Help Desk Survey for ticket number $tick_num.<br>";
$body.= "1. When you called the help disk, how was your call handled?<br>";
$body.="<span>".$ques_1[$rad1]."</span><br><br>";
$body.= "2. Was your call handled in a courteous manner?<br>";
$body.="<span>".$ques267[$rad2]."</span><br><br>";
$body.= "3. How long did it take someone to contact you?<br>";
$body.="<span>".$ques35[$rad3]."</span><br><br>";
$body.= "4. How would you rate the Network Technician that you dealt with on each of the following?<br>";
$body.="&nbsp &nbsp Courtesy <span>".$ques4[$crad4]."</span><br>";
$body.="&nbsp &nbsp Knowledge <span>".$ques4[$krad4]."</span><br>";
$body.="&nbsp &nbsp Overall <span>".$ques4[$orad4]."</span><br><br>";
$body.= "5. How long did it take to completely solve your problem?<br>";
$body.="<span>".$ques35[$rad5]."</span><br><br>";
$body.= "6. What was your overall satisfaction in the service you received?<br>";
$body.="<span>".$ques267[$rad6]."</span><br><br>";
$body.= "7. How do you like the new Web Enabled Help Desk for logging and tracking problems?<br>";
$body.="<span>".$ques267[$rad7]."</span><br><br>";
$body.= "Comments:<br>";
$body.="<span>".stripslashes($comments)."</span><br>";
$body.= "</body></html>";
$announce_subject = "Help Desk Survey Results for ticket number $tick_num";
$MP = "/usr/sbin/sendmail -t";
$fd = popen($MP,"w");
fputs($fd, "To: $announce_to_email\r\n");
fputs($fd, "From: $announce_from_email\r\n");
fputs($fd, "Subject: $announce_subject\r\n");
fputs($fd, "X-Mailer: PHP4\n");
fputs($fd, "MIME-Version: 1.0\n");
fputs($fd, "Content-Type: text/html; charset=iso-8859-1\n");
fputs($fd, "Content-Transfer-Encoding: 8bit\n");
fputs($fd, $body . "\r\n");
pclose($fd);


Like I sain search the serversid forums for examples.

bradyj
03-29-2005, 07:15 PM
Just to help, I had this question a while back -- how to code for emails. It definately requires going back to old practices, since many email readers view html in unusually different ways:
http://www.codingforums.com/showthread.php?t=47586

requestcode
03-29-2005, 07:50 PM
Nice resource Bradyj. That pretty much says it all. :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum