Jump to content

[SOLVED] Sending emails from user account?


EchoFool

Recommended Posts

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 .

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.