421 users online
225533 members
487 active today
Advertise Here
Photos
|
Quizzes
|
LiveSecret
|
Memberlist
|
Dictionary
|
News
|
FAQ
Member Spotlight
CrackWaffles
Peeves:
Chronic stupidity.
Mood:
Crazy
You have 1 new
message
.
Emergency Help
Until you sign up you can't do much. Yes, it's free.
Sign Up Now
Membername:
Password:
Already have an account?
►
Invite Friends
►
Active Members
►
Groups
►
Contests
Moderators
2 online / 30 MPM
Fresh Topics
Is it just me..
GAH! I feel so accomplished!
Just got the news: Solomon Grundy left!?
I broke up with my bf today
Confused 21 Year old virgin
Right then, off on yet another date...
Im off for a while =)
Oh goodness yay
You wanna know what fake is?
Name change Part II.
I want it to be new years already...
Members who closed accounts in last week
-sighs-
Let me tell you something,
So Happy :D
The Rev Dead
I'm appalled at how sexually incompetent teenagers are.
This is bad....right?
Man, I am in a pickle.
More Fresh Topics
LiveWire
/
Technical Forums
/
Programming & Application Development
/ Adding Reply
Quoting Post
Archived Topic:
It will not be bumped to the top of the forum.
Topic
PHP email: emails are getting blocked by spam filters!
Membername
Not a member?
Sign Up Free
(takes 20 seconds)
Password
Forgotten your password?
Post
Font:
Verdana
Arial Black
Georgia
Comic Sans
Impact
Size:
Tiny
Normal
Big
Huge
Color:
Default
Dark Red
Red
Orange
Brown
Green
Olive
Cyan
Blue
Dark Blue
Indigo
Black
[
Check Spelling
] [
Post Preview
] [
LiveTags
]
Quote: from [m]PiXiE[/m] at 12:31 pm on Mar. 9, 2007[quote]Ok. This seriously blows. I make the website for a pretty big ski resort/vacation reservations company. On the website I have a bunch of forms for things like comments, vacation inquiries, ski school inquires, all that jazz. People fill out the form, the info is entered into the database, and an email is sent to whoever is in charge of that particular department. Everything worked just fine - until last month! The emails stopped arriving in people's inboxes! Here is my email code: [code]function sendmail($to, $subject, $message){ $headers = "From: Group Inquiry <donotreply@xxxxxxx.com> \r\n"; $headers .= "Content-Type: text/html; charset=\"UTF-8\"\r\n"; mail ($to, $subject, $message, $headers); } $subject="New Group Inquiry"; $to = "Groups <groups@xxxxxxx.com>"; $message = "<html><body><p>Group Name: ".$group_name."</p></body></html>";[/code] This works fine when I send something to my gmail, but our work's email server blocks it, thinking that it is spam. One of our IT guys got rid of the \r\n (linebreaks) in the headers, and now the emails magically arrive!! The problem though... We needed those linebreaks! Now the emails arrive with the "from" field looking like "Group Inquiry Content-Type: text/html; charset=UTF-8" and so of course the html formatting in the email does not work. My question is: how do I get these emails to arrive with the custom headers that I need??[/quote]
FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic
by email
Notify me of new replies to this topic
by private message
Original Post
PiXiE
Posted at 12:31 pm on Mar. 9, 2007
Ok. This seriously blows. I make the website for a pretty big ski resort/vacation reservations company. On the website I have a bunch of forms for things like comments, vacation inquiries, ski school inquires, all that jazz. People fill out the form, the info is entered into the database, and an email is sent to whoever is in charge of that particular department. Everything worked just fine - until last month! The emails stopped arriving in people's inboxes! Here is my email code:
Code:
function sendmail($to, $subject, $message){
$headers = "From: Group Inquiry <donotreply@xxxxxxx.com> \r\n";
$headers .= "Content-Type: text/html; charset=\"UTF-8\"\r\n";
mail ($to, $subject, $message, $headers);
}
$subject="New Group Inquiry";
$to = "Groups <groups@xxxxxxx.com>";
$message = "<html><body><p>Group Name: ".$group_name."</p></body></html>";
This works fine when I send something to my gmail, but our work's email server blocks it, thinking that it is spam. One of our IT guys got rid of the \r\n (linebreaks) in the headers, and now the emails magically arrive!! The problem though... We needed those linebreaks! Now the emails arrive with the "from" field looking like "Group Inquiry Content-Type: text/html; charset=UTF-8" and so of course the html formatting in the email does not work.
My question is: how do I get these emails to arrive with the custom headers that I need??
Replies
PiXiE
Posted at 12:31 pm on Mar. 9, 2007
Ok. This seriously blows. I make the website for a pretty big ski resort/vacation reservations company. On the website I have a bunch of forms for things like comments, vacation inquiries, ski school inquires, all that jazz. People fill out the form, the info is entered into the database, and an email is sent to whoever is in charge of that particular department. Everything worked just fine - until last month! The emails stopped arriving in people's inboxes! Here is my email code:
Code:
function sendmail($to, $subject, $message){
$headers = "From: Group Inquiry <donotreply@xxxxxxx.com> \r\n";
$headers .= "Content-Type: text/html; charset=\"UTF-8\"\r\n";
mail ($to, $subject, $message, $headers);
}
$subject="New Group Inquiry";
$to = "Groups <groups@xxxxxxx.com>";
$message = "<html><body><p>Group Name: ".$group_name."</p></body></html>";
This works fine when I send something to my gmail, but our work's email server blocks it, thinking that it is spam. One of our IT guys got rid of the \r\n (linebreaks) in the headers, and now the emails magically arrive!! The problem though... We needed those linebreaks! Now the emails arrive with the "from" field looking like "Group Inquiry Content-Type: text/html; charset=UTF-8" and so of course the html formatting in the email does not work.
My question is: how do I get these emails to arrive with the custom headers that I need??
All 9 previous replies displayed.
Tooltip