EchoFool Posted October 22, 2008 Share Posted October 22, 2008 I currently have a script which "grabs" user's contacts when they give their msn/yahoo etc info and then they can "invite the user". But what I don't get is why is it when I do it say on Facebook. to invite friends they get it in their normal inbox, but when its from my site it goes to junk mail. So i thought of the idea that if a user logs into get their contact details.. is it possible that whilst the script access their inbox contacts, it can also send the emails to their contacts as if it was from them rather than from my server... as emails from my server go straight to junk and so its not a very effective way to invite people if they never get the emails. Is this do-able at all... if so what can you provide infomation on what I need to be looking for to learn how to do it. Thanks. Quote Link to comment Share on other sites More sharing options...
revraz Posted October 22, 2008 Share Posted October 22, 2008 On your site, what is the FROM header set to? Quote Link to comment Share on other sites More sharing options...
discomatt Posted October 22, 2008 Share Posted October 22, 2008 I think you're much better off designing your emails to get past the junk filter than you are sending emails 'through' them ( This would reaaaaally piss me off, at least ). Then again, I really don't know why people give social networking sites their webmail password in the first place! Quote Link to comment Share on other sites More sharing options...
EchoFool Posted October 22, 2008 Author Share Posted October 22, 2008 On your site, what is the FROM header set to? This is what i have after they have selected which contacts they want to invite via the form using check boxes it puts them into arrays: <?php //test mail $SELECT = mysql_query("SELECT Email FROm userregistration WHERE UserID='{$_SESSION['Current_User']}'") Or die(mysql_error()); $row = mysql_fetch_assoc($SELECT); $Me = $row['Email']; foreach($_POST['invite'] as $email){ // Send the email. $subject = "Hey.."; $headers = "From: ".$Me; $message = "Dear ".$email; $message = $message."\r \r \r Your friend ".$Me." would like to invite you to a site that he/she thinks you will enjoy!"; $message = $message."\r \r"; $message= $message." testing testing "; $message = $message. "\r \r Why not check the site out: \r \r http://www.domain.com"; mail($email, $subject, $message, $headers); } ?> Seems to go to junk mail every time though for 99% of people. Quote Link to comment Share on other sites More sharing options...
revraz Posted October 22, 2008 Share Posted October 22, 2008 Try using a email that's on your domain instead. Quote Link to comment Share on other sites More sharing options...
discomatt Posted October 22, 2008 Share Posted October 22, 2008 The email's origin is from your domain, yet the headers say it's from their email address' domain. This will get flagged as SPAM. Quote Link to comment Share on other sites More sharing options...
CroNiX Posted October 22, 2008 Share Posted October 22, 2008 Your server also has to have PTR records and other things enabled via DNS settings. Some receiving servers don't care, but places like yahoo do. As spam continues to grow, more and more servers require this info as it cuts back on it but makes it more of a pain to setup. Quote Link to comment Share on other sites More sharing options...
EchoFool Posted October 22, 2008 Author Share Posted October 22, 2008 revraz : don't think i have one other than sending emails directly from my server =/ discomatt : is there a way it can be from their email rather than my server with out trying to make the decieving idea of the email being from the user? CroNIX : are these settings in cpanel/WHM usually? If so i can ask my host about it... Hope you can help . Quote Link to comment Share on other sites More sharing options...
CroNiX Posted October 22, 2008 Share Posted October 22, 2008 In cPanel (for domain owner) its under "Email Authentication". Enable the domain keys and SPF record. Also a PTR record is good, but I manually added that one in (Im master admin for cPanel, so I can make direct edits to DNS entries). Quote Link to comment Share on other sites More sharing options...
CroNiX Posted October 22, 2008 Share Posted October 22, 2008 discomatt : is there a way it can be from their email rather than my server with out trying to make the decieving idea of the email being from the user? I know this wasn't directed at me, but the answer is no. Its a very bad idea to try this. Your server will most likely be blacklisted by spamcop or something. It will take a very long time to undo the damage this will cause. Quote Link to comment Share on other sites More sharing options...
revraz Posted October 22, 2008 Share Posted October 22, 2008 Also, can't you just create a new email on your domain to use as the FROM? You are asking for a solution, we are giving you ones to try. Quote Link to comment Share on other sites More sharing options...
EchoFool Posted October 22, 2008 Author Share Posted October 22, 2008 Also, can't you just create a new email on your domain to use as the FROM? You are asking for a solution, we are giving you ones to try. Don't ya to pay to set up an email for a domain ? If not ill speak to my host on how to set one up. CroNIX, thanks for the warning. Quote Link to comment Share on other sites More sharing options...
revraz Posted October 22, 2008 Share Posted October 22, 2008 Depends on your host, I have 500 free with my host. Quote Link to comment Share on other sites More sharing options...
EchoFool Posted October 22, 2008 Author Share Posted October 22, 2008 Ok ill ask my host about it ... thanks revraz Quote Link to comment Share on other sites More sharing options...
R4nk3d Posted October 22, 2008 Share Posted October 22, 2008 Yahoo and comcast check for a reverse record to see if you actually should be able to send emails out from the server ur hosting email on. if not it doesnt even get in. u have to get this enabled from ur isp. Quote Link to comment Share on other sites More sharing options...
CroNiX Posted October 22, 2008 Share Posted October 22, 2008 ah yes, forgot to mention the rDNS entry... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.