765 users online
224936 members
1300 active today
Advertise Here
Photos
|
Quizzes
|
LiveSecret
|
Memberlist
|
Dictionary
|
News
|
FAQ
Member Spotlight
atla2323
Favs:
Movies lotr, never back down, taken, tra...
Mood:
Tired
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
4 online / 44 MPM
Fresh Topics
I saw my ex today at the concert
Livewire, does this seem right?
It's really frustrating not being able to
Its a bad idea to hookup with somebody with a kid.
So this black guy started on me tonight...
Mentally Preparing for Army
You are pissing me off mods
I find this kind of sad
I just had a nap
What are your thoughts on this song??
Oh my God! If Murphy's dead, that means...
I close my eyes and see you before me.
Brittany murphy died
would you rather?
This girl is fucking amazing...
Who is the most fuckable looking girl on LW
Holy shit I just found out they died!
Awww I'm unattractive.
why the fuck...?
Big problems with my boyfriend...
Movement disorder
More Fresh Topics
LiveWire
/
Technical Forums
/
Programming & Application Development
/ Adding Reply
Adding Reply
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
]
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