|
|
|
|
![]() ![]() |
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.
|
|
|
|
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: [MODERATOR] Posts: 3,970 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
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.
|
|
|
|
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!
|
|
|
|
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: [MODERATOR] Posts: 3,970 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
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. |
|
|
|
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 |
|
|
|
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: [MODERATOR] Posts: 3,970 Joined: 24-July 05 From: In Trouble Again... still? Member No.: 9,787 ![]() |
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. |
|
|
|
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.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version |