HTML - Send Html In An Email
Does anyone know of a good way to construct & send emails with html in it? I'd like to be able to send professional looking emails to my customers.
Similar TutorialsI am trying to send out an email with html page attached. It an auto generated html page with small pieces of sliced images. All images are in tables. When I send out a test email, it doesn't work on hotmail with firefox. the table breaks down as it is. The original image is a perfect oval. It actually works well on gmail, yahoomail & outlook. It even works on hotmail with IE. But only not on hotmail with firefox. Anyone had the same problem before?? Please help~~~ My site is being developed in html. I want to give an option of sending email. Is this possible in html to send an email if yes means can anyone send me the code Hello, I am trying to to write HTML code that will let people fill out a form, but I need it sent to an email address (tcutler@lighthouseandmeyu.org) This is what I have: HTML Code: Please Provide Your Input!: <form action="tcutler@lighthouseandmeyu.org" METHOD=POST> <P><TEXTAREA ROWS=10 COLS=50 NAME=Comments></TEXTAREA></P> <P><INPUT TYPE=SUBMIT VALUE=Send></P> </FORM> I have this code that I am using for a contact form on my website. What do I need to add for it to send the data in the fields to my email address Code: <form name='Contact Time For You' action='sent.htm' method='POST' enctype='multipart/form-data' onsubmit='return verifyMe();'> <table class='table_form_1' id='table_form_1' cellspacing='0' width="271" align="right"> <tr> <td class='ftbl_row_1a' width="241" align="left" > <font face="Arial" size="2"><LABEL for='Full_Name' ACCESSKEY='none' ><b style='color:red'>*</b>Your Name </label></font> <font face="Arial"> <input type='text' name='Full_Name' id='Full_Name' size='34' value=''></font></td> </tr> <tr> <td class='ftbl_row_2a' width="241" align="left" > <p> <font face="Arial" size="2"><LABEL for='Email' ACCESSKEY='E' ><b style='color:red'>*</b><u>E</u>mail Address </label></font> <font face="Arial"> <input type='text' name='Email' id='Email' size='34' value=''></font></td> </tr> <tr> <td class='ftbl_row_1a' width="241" align="left" > <p style="margin-top: 0; margin-bottom: 0"> <font face="Arial" size="2"><LABEL for='Telephone' ACCESSKEY='T' ><b style='color:red'>*</b><u>T</u>elephone </label></font> </p> <p style="margin-top: 0; margin-bottom: 0"><font face="Arial"><input type='text' name='Telephone' id='Telephone' size='15' value=''></font></p> <p style="margin-top: 0; margin-bottom: 0"> </td> </tr> <tr> <td class='ftbl_row_2a' width="241" align="left" > <font face="Arial" size="2"><LABEL for='Enquiry_Text' ACCESSKEY='none' ><b style='color:red'>*</b>Enquiry</label></font><font face="Arial"><textarea name='Enquiry_Text' id='Enquiry_Text' cols='28' rows='6' value=''></textarea></font></td> </tr> <tr> <td class='ftbl_row_1a' width="241" align="left" > <p> <font face="Arial" size="2"><LABEL for='Code' ACCESSKEY='none' ><b style='color:red'>*</b>Offer Code </label></font> <font face="Arial"> <input type='text' name='Code' id='Code' size='34' value=''></font></td> </tr> <tr> <td align='center' width="249"> <p style="margin-top: 1; margin-bottom: 1"> </p> <p style="margin-top: 1; margin-bottom: 1"><font color="#FFFFFF"> <input type='submit' name='submit' value='Send' style="float: right; color: #FFFFFF; font-family: arial; font-weight: bold; background-color: #000080"></font> </td> </tr> </table> </form> Thank you in advance, Dan Hi all, I am scratching head for couple of days . I have a HTML page ,this has to be send through MicrosoftOutlook Express.When i click the internal link it has to go to the section of page,but the link it self is not enabling,its not working. thanks in advance My HTML page ---------------------- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Working Process Summary</title> </head> <body> <table class="newsletterboarder" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid" cellSpacing="0" cellPadding="0" width="751" align="left" border="0" id="table2"> <tr> <td><b><span style="FONT-SIZE: 9pt; COLOR: blue; FONT-FAMILY: Tahoma"> <img style="WIDTH: 782px; HEIGHT: 145px" alt="Working Process" border="0" v:shapes="_x0000_s1032"></span></b></td> </tr> <tr> <td class="header" style="PADDING-RIGHT: 10px; PADDING-LEFT: 3px; FONT-WEIGHT: bold; FONT-SIZE: 14px; PADDING-BOTTOM: 0px; COLOR: #ffffff; PADDING-TOP: 3px; FONT-FAMILY: Arial, Helvetica, sans-serif; HEIGHT: 20px; BACKGROUND-COLOR: #336699"> Working Process 14 November2007</td> </tr> <tr> <td style="BORDER-RIGHT: 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; BORDER-LEFT: 1px solid; PADDING-TOP: 5px; BORDER-BOTTOM: 1px solid" height="2543"> <div class="tableholder" title="Release Overview" style="WIDTH: 764px; HEIGHT: 210px"> <div class="tabletitle"> Information - Overview </div> </div> <div class="twoColumn_component"> <div class="rightColumn" style="WIDTH: 342px; HEIGHT: 159px"> <h2 class="blue">General Information</h2> <ul> <li><a href="#info7">Upcoming Dates & Events</a> </li> <li><a href="#info8">Detailed Status Information </a></li> </div> <p class="retop"><a title="#top" href="#top">Return to Top</a></p> <ul> </ul> <ul> <li><b>Issue (P2) : </b>info<br> <b>Action Plan: </b>Team is analyzing </li> </ul> </blockquote> <strong>Key Upcoming Milestones </strong> <ul> <li>Post Project Assessment <li>.</li> </ul> <p class="retop"><a title="#top" href="#top">Return to Top</a></p> <a id="#info3" title="#info3" href="#info3"></a> <h2 class="blue"> Release <strong> </strong></h2> <ul> <li <span style="FONT-FAMILY: Arial"><font face="Arial">RMSPRs</font> information format</span></font></span> </li> <li <font style="FONT-SIZE: 9pt" face="Arial">info mailed.</font></span></span></span> </li> <li><span style="FONT-FAMILY: Arial"><font style="FONT-SIZE: 9pt"> <font face="Arial">Target </font><span class="112494500-31102007"><font face="Arial">Development has started. </font></span></font></span> </span></span></span></li> <li><font style="FONT-SIZE: 9pt" face="Arial">Info follows.</font> </li> <li><font style="FONT-SIZE: 9pt" face="Arial">Coming with info.</font> </li> <li><font style="FONT-SIZE: 9pt"><span class="112494500-31102007"> <b><font face="Arial">Potential projects </font></b></span></font> <ul> <li><font style="FONT-SIZE: 9pt" face="Arial">Out ongoing </font></li> </ul> </li> </ul> <ul> <li>None </li> </ul> <strong>Key Upcoming info </strong> <ul> </ul> <p class="retop"><a title="#top" href="#top">Return to Top</a></p> <ul> <li>None </li> </ul> <ul> <li>.</li> </ul> <p class="retop"><a title="#top" href="#top">Return to Top</a></p> <strong>Key Issues and Risks </strong> <strong>Key Upcoming Milestones </strong> <ul> <p class="retop"><a title="#top" href="#top">Return to Top</a></p> <h2 class="blue">OOCRs for the week 11/12 to 11/16</h2> <p class="retop"><a title="#top" href="#top">Return to Top</a></p> <h2><a name ="info7">Upcoming Dates & Events</a></h2> <ul> <li>NEw info to be made available: 11 July </li> </ul> <p class="retop"><a title="#top" href="#top">Return to Top</a> </p> <h2 ><a name ="info8">For Detailed Information</a></h2> </tr> <tr> <font size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> <font size="1"><span style="FONT-SIZE: 7.5pt; FONT-FAMILY: Arial"> </tr> </table> </body> </html> thanks in advance Hi, I want to put in a form to get queries from the user, like so: Name: Email: Comments: 'Send' button and that it will send the information to my email address which is gmail? Thanks I need a code that has two input boxes (one for name, one for content) that sends to my email. I want it so people can send requests to me, without having to leave my site. Is that possible? Hi, I'm not sure if this is a HTML or server-side question, but here goes. I want to set up a page which sends an email as soon as i receive a visitor. The user would not see the mail has been sent as the code is either in the HTML itself, or a script call based on the HTTP return code. Anyone done this before? I'm trying to set up a website for my Mom, and I'm not very familiar with this stuff. I created the form below, but when I try it I get 3 or 4 pop ups about security and then it still doesn't send the data, and when I had my friend try it said she couldn't because the had no profile. Quote: <FORM METHOD="POST" ACTION="mailto:sharyl@sharylsphotojournal.com"> Name: <BR> <INPUT TYPE="text" NAME="name" SIZE="35"><BR> Email(If you want a response):<BR> <INPUT TYPE="text" NAME="email" SIZE="35"><BR> Message:<BR> <TEXTAREA NAME="message" ROWS=7 COLS=35> </TEXTAREA><BR> <INPUT TYPE="submit" VALUE="Send"> <INPUT TYPE="reset"> Can anyone help me know what I did wrong? Hi there, i would really appreciate if someone could help me. i have first tried a few things from searching around on google. but i either dont understand or its just not working!... first of all ill say im a beginner in html. but i created a survey/quiz page.. just a simple thing to see if i could. Using radio boxes etc.... I have a submit button at the bottom, but i want to know how to direct it to my email address? so that i receive the responses and can send the reply? i tried a form method to mailto my email but it doesnt work. so i think i may be on the wrong path.. all that happens is the page reloads. anyways could someone help. my page is being being hosted by free server, will this make a difference? thanks for your time. Hi there, I'm completely new to HTML and have no idea, coming from using Serif WebPlus, a pumped up Publisher some may say! Now, i downloaded a booking form (http://css-tricks.com/downloads/ scroll down till you see 'Step-by-Step Seminar Registration') It really is great, but i want to be able to get it to send the info collected to an email, how is this done? Can a newb achieve this?? Hello guys, Can anyone help me with a simple form. I need a form like this: A box where the user can enter his email adress. Under it a button: Send this to my email The function will be that a certain text is sent to his email adress. The text is one I choose before. Thanks guys! Hello guys, I was wondering if anyone is aware of a script that does this: You have an image on your website. When you click on the image a box should appear where you can insert your email and send the photo to your email. Anyone aware of something like that? Thanks a lot! Hi all, I myself created a web page and now I want to send it by yahoo mail box. Actualy one way is to attach file to email , but I want to send it in a way that whenever reciever opnes email he could see all pictures and text on the web page.Does anybody know how I can do that? regards. rawin Hi, so I'm trying to make this e-mail newsletter. It's entirely images, tables and text. So no javascript, just plain stuff. I tried attaching it as a signiture file and I had trouble sending it. It also didn't come out right. I'm trying to avoid using a software. Its basically just a block of HTML I need to show up as the only content in an email. If you just put HTML into a email text field, it just shows the HTML code in the email as text. Any ideas? Dear experts, I'm trying to send out a EDM. After creating the html mail, I realised that after attaching it to signature of my Outlook Express, my picture inside the html codes doesn't not appear. What should I do in order for the picture to appear ? Hope to hear some advice. Thanks. First of all, WOW does this look like a site that can make it happen for me.. websitemakingwise. Im new and boy, loving the info so far.. ok, my problem: So Im cleaning up this code, yes.. again. And I wanted to make this automated php thing that sends emails straight to my inbox. Without having to use the client installed. Only problem is that the submit button isnt doing anything. Could someone have a look whats wrong? Filename: ContactForm.html HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Mailformulier updates - As it is in heaven again</title> <style type="text/css"> <!-- body { background-image: url(afbeeldingen/ups_and_simulation.jpg); } .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 17px; color: #000000; } .style2 {font-family: Verdana, Arial, Helvetica, sans-serif} .style4 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; } .style6 {font-size: 14px} .style8 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; color: #000000; } a:link {color: #000000;} a:visited{color:#009;} a:hover {color: #000000;} .style10 {color: #FFFFFF} .style14 {font-family:"Bookman Old Style"; font-size: 14px; color: #000000; } #txt{ position:relative; text-align:center; left:100px; top:55px; width:420px; height:40px; z-index:2; font-stretch:wider; } div.row { clear: both; padding-top: 5px; } div.row span.label { float: left; width: 100px; text-align: right; } div.row span.formw { float: right; width: 235px; text-align: left; } div.spacer { clear: both; } --> </style></head> <body> <table width="600" height="400" border="1" align="center" bgcolor="#FFFFFF"> <div id="txt"> <p class="style1">Ja, ik heb interesse. Graag ontvang ik verdere informatie over de toekomstige activiteiten.</p> </div> <tr> <td width="44" height="150"> </td> <td width="814" height="100"> <br /> <br /> <br /> <br /> <div style= "width: 360px; background-color: #ccc; border: 1px dotted #333; padding: 5px; margin: 0px auto;"> <span class="style4"> <form> <div class="row"> <form action="FormToEmail.php" method="post" name="ContactForm"> <span class="label">Naam:</span> <span class="formw"><input type="text" name="Naamgegevens" title="Hier uw volledige naam" size="25" /></span> </div> <div class="row"> <span class="label">Adres:</span><span class="formw"> <input type="text" name="Naamgegevens" title="" size="25" /></span> </div> <div class="row"> <span class="label">Postcode:</span><span class="formw"> <input type="text" name="Postcode" title="" size="25" /></span> </div> <div class="row"> <span class="label">Woonplaats:</span><span class="formw"> <input type="text" name="Woonplaats" title="" size="25" /></span> </div> <div class="row"> <span class="label">Telefoon:</span><span class="formw"> <input type="text" name="Vaste telefoon" title="Uw vaste telefoon-nummer" size="25" /></span> </div> <div class="row"> <span class="label">Mobiel:</span><span class="formw"> <input type="text" name="Mobiel" title="" size="25" /></span> </div> <div class="row"> <span class="label">E-Mail:</span><span class="formw"> <input type="text" name="E-Mail" title="Het E-mail adres" size="25" /></span> </div> <p align="center"> <span class="style14"> <br /> <br /> <br /> ruimte voor opmerkingen/suggesties/reacties</span> <br /> <textarea name="opmerkingen" cols="40" rows="6"></textarea> </p> <div class="spacer"> </div> </form> <div align="center"> <input type="submit" value="Versturen"><br> </div> <br> </div> <div align="center"><span class="style10">-----</span> <a href ="basis.html"><img src = "afbeeldingen/TERUG.png" width="95" height="60" style="border-style: none"/></a></span></div></td> <td width="44"> </td> </tr> <tr> <td height="100" colspan="3"><div align="center"> </div></td> </tr> </table> </body> </html> Thanks for reading till this point! Hop you didnt mind the Dutch lol. FILENAME: FormToEmail.php PHP Code: <?php $my_email = "rsizania@gmail.com"; /* Enter the continue link to offer the user after the form is sent. If you do not change this, your visitor will be given a continue link to your homepage. If you do change it, remove the "/" symbol below and replace with the name of the page to link to, eg: "mypage.htm" or "http://www.elsewhere.com/page.htm" */ $continue = "www.google.com"; /* Step 3: Save this file (FormToEmail.php) and upload it together with your webpage containing the form to your webspace. IMPORTANT - The file name is case sensitive! You must save it exactly as it is named above! Do not put this script in your cgi-bin directory (folder) it may not work from there. THAT'S IT, FINISHED! You do not need to make any changes below this line. */ $errors = array(); // Remove $_COOKIE elements from $_REQUEST. if(count($_COOKIE)){foreach(array_keys($_COOKIE) as $value){unset($_REQUEST[$value]);}} // Check all fields for an email header. function recursive_array_check_header($element_value) { global $set; if(!is_array($element_value)){if(preg_match("/(%0A|%0D|\n+|\r+)(content-type:|to:|cc:|bcc:)/i",$element_value)){$set = 1;}} else { foreach($element_value as $value){if($set){break;} recursive_array_check_header($value);} } } recursive_array_check_header($_REQUEST); if($set){$errors[] = "You cannot send an email header";} unset($set); // Validate email field. if(isset($_REQUEST['email']) && !empty($_REQUEST['email'])) { if(preg_match("/(%0A|%0D|\n+|\r+|:)/i",$_REQUEST['email'])){$errors[] = "Email address may not contain a new line or a colon";} $_REQUEST['email'] = trim($_REQUEST['email']); if(substr_count($_REQUEST['email'],"@") != 1 || stristr($_REQUEST['email']," ")){$errors[] = "Email address is invalid";}else{$exploded_email = explode("@",$_REQUEST['email']);if(empty($exploded_email[0]) || strlen($exploded_email[0]) > 64 || empty($exploded_email[1])){$errors[] = "Email address is invalid";}else{if(substr_count($exploded_email[1],".") == 0){$errors[] = "Email address is invalid";}else{$exploded_domain = explode(".",$exploded_email[1]);if(in_array("",$exploded_domain)){$errors[] = "Email address is invalid";}else{foreach($exploded_domain as $value){if(strlen($value) > 63 || !preg_match('/^[a-z0-9-]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}}}}} } // Check referrer is from same site. if(!(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) && stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";} // Check for a blank form. function recursive_array_check_blank($element_value) { global $set; if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}} else { foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);} } } recursive_array_check_blank($_REQUEST); if(!$set){$errors[] = "You cannot send a blank form";} unset($set); // Display any errors and exit if errors exist. if(count($errors)){foreach($errors as $value){print "$value<br>";} exit;} if(!defined("PHP_EOL")){define("PHP_EOL", strtoupper(substr(PHP_OS,0,3) == "WIN") ? "\r\n" : "\n");} // Build message. function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");} $message = build_message($_REQUEST); $message = $message . PHP_EOL.PHP_EOL."-- ".PHP_EOL.""; $message = stripslashes($message); $subject = "FormToEmail Comments"; $headers = "From: " . $_REQUEST['email']; mail($my_email,$subject,$message,$headers); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Dreamweaver Tutorial - Contact Form</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#ffffff" text="#000000"> <div> <center> <b>Thank you <?php print stripslashes($_REQUEST['name']); ?></b> <br>Your message has been sent <p><a href="<?php print $continue; ?>">Click here to continue</a></p> <p><b>Dreamweaver Spot</b> by <a href="http://dreamweaverspot.com">dreamweaverspot.com</a></p> </center> </div> </body> </html> Ok thanks!! So.. whats wrong? Im a total noob.. and it isnt even that I started from scratch.. some of it was already there. Appreciate your advice hi all, something I thought would be simple is, well, not so simple for me!! all that I want to do is send a complete html web page as an ordinary email so that people viewing it can click on the existing links and buttons.(for payments etc) I have tried sending it several times and on aol none of the headings/gif's n jpg's are displayed, using squirrel mail, some of the links are highlighted, however, some are missing. using outlook, well, no comment!!! surely there is an easy (hehe) way to send a whole hyml web page as an email? many thanks for all help, Ed |