LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 804 users online 221797 members 1353 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
darkangel101
Interests: I like band, music, reading, writin...
Mood: Down
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
6 online / 35 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic

PHP email: emails are getting blocked by spam filters!
Oh no!
Replies: 9Last Post Mar. 9, 2007 12:48pm by derailedjet
Welcome to LiveWire!
We're Stronger Together.
Join the Community
Single page for this topic Email Print Favorite
( PiXiE )


24.24.1.1358

Patron
Reply
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??


12:31 pm on Mar. 9, 2007 | Joined: July 2002 | Days Active: 1,663
Join to learn more about PiXiE Alberta, Canada | Straight Female | Posts: 4,837 | Points: 34,868
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic