How Do I Send An Html Newsletter? - Please help

free web hosting
Open Discussion > CONTRIBUTE > The Internet > Website Discussion

How Do I Send An Html Newsletter? - Please help

wild20
I am trying to start a newsletter, and would like to know how you do it. I have the template, but if I send the html code, it send the html code. How to I put it in an email so you can actually view it? I tried one where they said put it so it is
CODE
HTML = HTML
, but it didn't work. Could someone please help me out here? Thanks.

Reply

jlhaslip
To allow html emails, you have to use the correct headers on the form. Google on multi-part form headers. I forget the exact header to send, but it is relatively simple enough to do. When I get home, I'll have a look to see the correct format and post it here.

Reply

wild20
Thank you Jim! I can honestly say, with the help you guys have been giving me. Trap is awesome. You guys are so cool. Thank you for all your time. If you could get that to me, I would appreciate it so much. You have done a lot and I would love it if you would give me your site URL and if it is clean, I really want to link to it. Thanks guys!

Reply

jlhaslip
The mail() has three required parameters. ($to, $subject, $body) and a fourth ($from_header) is reccomended.
In order to send the email as an html document, the fourth parameter has to set the MIME type as text/html as follows:

CODE

$add_header = 'MIME-VERSION; 1.0n';
$add_header .= '(anti-spam-content-type:) text/html; charset=iso-8859-1n";


So, for example, the correct code would then become:

CODE

mail($to, $subject, $body, $from_header . $add_header);

where the $to, $subject, $body, $from_header are previously set as per a regular text email. Note that the $add_header is concatenated to the $from_header inside the mail function in this example. It could be concatenated outside the function also, if you desire.

 

 

 


Reply

wild20
Hmm. I am a little confused. Maybe you could clarify one thing. If I wanted to send a html code that was:
CODE

<head>
</head>
<body bgcolor="red">
<p>This is a test</p>
</body>

Then how would I integrate those exactly. Could you take what you just showed me and put it into how it would look with my code. It will be longer and better, and much nicer. So don't worry laugh.gif

Reply

jlhaslip
Okay, something like this would work using the example you provide:
CODE

$body = "<head>n";
$body .= "</head>n";
$body .= "<body bgcolor="red">n";
$body .= "<p>This is a test</p>n";
$body .= "</body>n";

What this does is concatenant the "body" of the message into the variable named $body, complete with newline characters at the end of each line. Notice that the double quotes must be escaped. Then continue with the rest of the parameter variables like this:
CODE

$to = "your_list_member_email@example.com";
$subject = " as per usual";
$from_header = "your_email@example.com";


Lastly, the example given above to output the 4 parameters using the mail() function:
CODE

$add_header = 'MIME-VERSION; 1.0n';
$add_header .= '(anti-spam-(anti-spam-(anti-spam-content-type:))) text/html; charset=iso-8859-1n";
mail($to, $subject, $body, $from_header . $add_header);

At least I think that will work. Won't be far off. Post back here if you need any more assistance.

Reply

wild20
Hmm. Only one more thing. I don't want the newslette to be sent out automatically. I want it sent to people I specify. So the command sending it to my list is useless. All I realy want is to be able to open my mail account at Cpanel, type in the people's name or list name myself, and then send it out. It look like this is PHP to me. Is there a way just to insert the html code into the body text area of a message, like gmail? If not, then what does this code do and where do I put it? As you can see, I am quite an amatuer, and would go sp far as to say coding and/or newsletter building illiterate.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. how to send a newsletter invisionfree - 717.37 hr back. (1)
Similar Topics

Keywords : html newsletter

  1. Making A Picture Viewer Website - Html programming or javascript (3)
  2. Google Has Sloppy Coders - Can't even code proper HTML (6)
    Ok, just out of curiosity I ran Google through the w3c validator to see if the coders wrote valid
    code. I found out that Google had 50 errors. One of them was no DOCTYPE! I was surprised that
    Google has sloppy coders like that. It's not just the fact that it is a big company that
    generates millions of dollars, but the fact they have created one of the greatest search engines and
    can't even code correct HTML. The code looks extremely messy. Here is a link to the validation
    page: ...
  3. Basic Web Design (html) - sample index file included (3)
    Web Design Web Design is one of the easiest and neatest things that you can learn. Most people
    often misunderstand it and throw it to the side and then pay lots of money for others to make and
    maintain a website for you. This shouldn’t be the case. The best thing for you to do is to learn
    how to make a website. In this article, you will learn advanced webpage design in under 20 minutes.
    There are literally tons of different computer languages used to create websites. The hardest of
    them all I would say is PHP and MySQL. These are difficult to understand because o...
  4. View The Errors In Your Html! - (14)
    Did you ever do a script and think... How do I know if it is going to display right for everyone....
    How do I know my HTML is pure 100% clean, well, think no more... http://validator.w3.org/ - on
    that URL, you can put in your URL and it tells you how many errors and it displays the errors in
    your coding!! example: http://validator.w3.org/check?uri=http%3A%...&doctype=Inline
    Displays 51 errors! Enjoy /wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'
    /> Jack...
  5. Html Or Xhtml - Which one do you prefer (10)
    I know that XML and XHTML have taken long straids.Which one do you prefer. Is transferring my site
    to XHTML from HTML worthy Comment your views /dry.gif' border='0' style='vertical-align:middle'
    alt='dry.gif' /> ...
  6. Free & Good Tool - To optmize html code (2)
    The tool is named as: Absolute html compressor Just go to google.com and type this keywords, if
    you want to try this tool: "Download absolute html compressor" Of course there's alsow more
    ools that do this, but they're all shareware, this one is freeware and realy do a good work. I
    Have been using it and it realy reduce the size of the html page. Just try it, and then give me a
    feedback about it....



Looking for send, html, newsletter

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for send, html, newsletter

*MORE FROM TRAP17.COM*
advertisement



How Do I Send An Html Newsletter? - Please help



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE