Horrible Email HTML troubles
Moderator: General Moderators
Horrible Email HTML troubles
Hello,
I have figured out how to email with html from a php script, although i am getting
X-NAS-Language: English X-NAS-Bayes: #0: 7.38197E-108; #1: 1 X-NAS-Classification: 0 X-NAS-MessageID: 71 X-NAS-Validation: {4122194F-EB3B-4CDD-8248-92C555CF49A9}
at the top of my email.
How do I get rid of that crap? I looked all over the internet, and all of the examples send this with the email.
Please help.
Thank you!
-Cameron
I have figured out how to email with html from a php script, although i am getting
X-NAS-Language: English X-NAS-Bayes: #0: 7.38197E-108; #1: 1 X-NAS-Classification: 0 X-NAS-MessageID: 71 X-NAS-Validation: {4122194F-EB3B-4CDD-8248-92C555CF49A9}
at the top of my email.
How do I get rid of that crap? I looked all over the internet, and all of the examples send this with the email.
Please help.
Thank you!
-Cameron
$headers .= "Content-Type: text/html\r\n";
was the header, along with some reply to stuff.
Then I pretty much had:
message = "
Sent from: $yourname <br> (at first I used \n, but then when using the html that wouldnt work)
Link: $link \<br>
etc etc etc"
I don't have the exact script anymore because I gave up and put it back to plain text, but I am having a lot of difficulty writing php emails. At first I had enough trouble using line skipts.
The only reason I went with html was to add some links in the actual email, because some email programs don't automatically make them links. If theres another way to do that, hit me up.
was the header, along with some reply to stuff.
Then I pretty much had:
message = "
Sent from: $yourname <br> (at first I used \n, but then when using the html that wouldnt work)
Link: $link \<br>
etc etc etc"
I don't have the exact script anymore because I gave up and put it back to plain text, but I am having a lot of difficulty writing php emails. At first I had enough trouble using line skipts.
The only reason I went with html was to add some links in the actual email, because some email programs don't automatically make them links. If theres another way to do that, hit me up.
-
Charles256
- DevNet Resident
- Posts: 1375
- Joined: Fri Sep 16, 2005 9:06 pm
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
feyd | Please use
Hmmm
feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
X-NAS-Language: English X-NAS-Classification: 0 X-NAS-MessageID: 96 X-NAS-Validation: {4122194F-EB3B-4CDD-8248-92C555CF49A9}
Is what I get from a simple script i got off the internet similar to mine.Code: Select all
<?php
$to = 'EMAIL';
$subject = 'Wakeup bob!';
$message = '<b>yo</b>, whassup?';
$headers = "From: admin@cameronperry.com\r\n" . "Content-Type: text/html\r\n";
// Send
mail($to, $subject, $message, $headers);
?>feyd | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Last edited by blobman on Sun Nov 04, 2007 11:49 pm, edited 2 times in total.