Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> How Do I Send An Html Newsletter?, Please help
wild20
post Apr 21 2006, 07:02 PM
Post #1


Never alone with Christ
*********

Group: Members
Posts: 647
Joined: 22-July 05
Member No.: 9,713



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.
Go to the top of the page
 
+Quote Post
jlhaslip
post Apr 21 2006, 07:06 PM
Post #2


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,970
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



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.
Go to the top of the page
 
+Quote Post
wild20
post Apr 21 2006, 07:21 PM
Post #3


Never alone with Christ
*********

Group: Members
Posts: 647
Joined: 22-July 05
Member No.: 9,713



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!
Go to the top of the page
 
+Quote Post
jlhaslip
post Apr 21 2006, 10:57 PM
Post #4


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,970
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



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.
Go to the top of the page
 
+Quote Post
wild20
post Apr 23 2006, 03:23 AM
Post #5


Never alone with Christ
*********

Group: Members
Posts: 647
Joined: 22-July 05
Member No.: 9,713



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
Go to the top of the page
 
+Quote Post
jlhaslip
post Apr 23 2006, 03:43 AM
Post #6


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,970
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



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.
Go to the top of the page
 
+Quote Post
wild20
post Apr 23 2006, 05:21 AM
Post #7


Never alone with Christ
*********

Group: Members
Posts: 647
Joined: 22-July 05
Member No.: 9,713



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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. where did you learn html from?(85)
  2. Does Anyone Know Where I Can Get A Free Html Maker(13)
  3. The Best And Free Website/html Editors + Text Editors(48)
  4. Html Tag For A Code Box(4)
  5. Adding Rows & Columns In Html Table Using Javascript(1)
  6. Wanting To Touch Up/learn My Html Again(27)
  7. Learn Html Quick And Easy(14)
  8. Send Fake Sms From Your Nokia Phone(16)
  9. Psd --> Editable Html(3)
  10. Html Code Tester. Online Script(15)
  11. Php Functions To Send Mail(8)
  12. Where Is There A Good Site To Learn Web Html?(20)
  13. Has Anybody Tried Ms Expression Web Html Editor(3)
  14. Spammers Using My Domain To Send Spam(4)
  15. Html Form!(4)
  1. Learn Html, Css, C And C++ Online For Free(12)
  2. Flash Media Into Html/css Website(1)
  3. What Is The Best Free Html Editor?(19)
  4. Add Flashing Inbox To Invisionfree Forum(1)
  5. Send Your Name To The Moon!(11)
  6. Naming Web Page Files(9)
  7. How To Make Php Newsletter Script(3)
  8. Making A Picture Viewer Website(3)
  9. Sitepoint: The Ultimate Html Reference(0)
  10. Html, Xhtml, And Css, Sixth Edition (visual Quickstart Guide) Review(0)
  11. Html Based Emails On Hotmail(0)
  12. Flippingbook Html Edition(0)
  13. How To Send Mms Using A Pc(2)


 



- Lo-Fi Version