Reply
Embeding html in emails??
Old 07-11-2005, 06:18 PM Embeding html in emails??
zen4thought's Avatar
Novice Talker

Posts: 13
Location: Milwaukee WI
I have an email newsletter I made in html code. And i was wondering if anyone knows how to embed this in an email to send out to people? I tried the simple <embed> </embed> code, but when I tested out the email all I got back was the html coding...
Any sugestions?
Thank you in advance!!
zen4thought is offline
Reply With Quote
View Public Profile Visit zen4thought's homepage!
 
When You Register, These Ads Go Away!
Old 07-11-2005, 06:49 PM
pjb007's Avatar
Super Talker

Posts: 100
Location: UK
In Outlook Express if you click Create Mail at the bottom of the compose window there is a code tab I have never tried it but could you copy the code into there and send the email?
__________________
pjb007
pjb007 is offline
Reply With Quote
View Public Profile Visit pjb007's homepage!
 
Old 07-11-2005, 10:05 PM
onlyplace4's Avatar
Extreme Talker

Posts: 159
Location: Skegness, Lincolnshire, England
Are you intending to mail this out one by one from your mail client (outlook, outlook express or whatever), or are you using an online script to mail to a list of people?
onlyplace4 is offline
Reply With Quote
View Public Profile Visit onlyplace4's homepage!
 
Old 07-11-2005, 11:17 PM
zen4thought's Avatar
Novice Talker

Posts: 13
Location: Milwaukee WI
Quote:
Originally Posted by onlyplace4
Are you intending to mail this out one by one from your mail client (outlook, outlook express or whatever), or are you using an online script to mail to a list of people?
I just plan to email this out one by one. It's not intended for a big group.
zen4thought is offline
Reply With Quote
View Public Profile Visit zen4thought's homepage!
 
Old 07-12-2005, 06:42 AM
onlyplace4's Avatar
Extreme Talker

Posts: 159
Location: Skegness, Lincolnshire, England
Hmmmmmmmmm ... not sure how to do this using your mail client as I have always used scripts to mail HTML emails as this enables me to set the mime type correctly so that the HTML is viewed and not simply seen as text. Below is a very simple mailing page using PHP:
PHP Code:
<?php
$to 
$_POST['to'];
if (!
$to) { $to 0; }

// read in the newsletter - edit the filename to suit
$fname "your_newsletter.html";
$handle fopen($fname"rb");
if (
flock($handleLOCK_EX)) {
    
$mess file_get_contents($fname);
    
flock($handleLOCK_UN);
}
fclose($handle);

// edit this line to give the subject
$subject "This month's newsletter";
// edit this line to the email address you are mailing from
$from "you@yourdomain.com";

if (
$to != 0) {
    
// check the email address is valid
    
if (eregi ("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$"$to)) {
        
// if email address is valid, mail the newsletter
        
$headers  "MIME-Version: 1.0\n";
        
$headers .= "Content-Type: text/html; charset=iso-8859-1 \n";
        
$headers .= "To: $to <$to>\n";
        
$headers .= "From: $from <$from>\n";
        
mail(""$subject$mess$headers);
    }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>Untitled</title>
</head>
<body>
<?php
if (!eregi ("^([a-z0-9_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,4}$"$to)) {
    echo 
"<span style='color:red'>The email address you entered did not conform to recognised standards.</span>";
}
?>
<form action="send.php" method="post" name="send" id="send">
Email:&nbsp;<input type="text" name="to">&nbsp;<input type="submit" value="Send">
</form>
</body>
</html>
This is very basic and would mean that you would have to manually edit a couple of lines each month, but it does at least check that the email address you have entered is correct. Name the page send.php and upload it into an area of your site you have as an admin area, or is secure from other people, then all you have to do is manually enter the email address and click on Send and your email will be delivered in HTML!

This is based on a script I wrote for my ecards site that sends the entire ecard to the inbox, and not just a link.
onlyplace4 is offline
Reply With Quote
View Public Profile Visit onlyplace4's homepage!
 
Reply     « Reply to Embeding html in emails??
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13568 seconds with 12 queries