supanoob Posted February 6, 2007 Share Posted February 6, 2007 Ok so i want to email and activation key and the account details to my members on signup but it doesnt seem to send to hotmail users >< this is the code i have: <?php mail($email_address, 'Do Not Reply', "Thank You for registering an account at TORD. Below are your login details please keep them safe. Email: $email_address Password: $password Activation Key: $randomString Log in to activate your account using the above key. Security Question: $secret_question Security Question Answer: $secret_answer"); ?> any help to allow it to send to hotmail users would be greatly apprecited and credit will be given. Link to comment https://forums.phpfreaks.com/topic/37350-emailing-signup/ Share on other sites More sharing options...
Balmung-San Posted February 6, 2007 Share Posted February 6, 2007 Are you sure it's not being blocked by their spam filters? This seems to happen with automatically generated emails, and hotmail. Also, it's best to specify a "From:" that doesn't seem generic. Most default configurations will send the email from something like "[email protected]" or "[email protected]", etc. These are common for mass emails, and hotmail most likely blocks emails that are sent from addresses like those. Link to comment https://forums.phpfreaks.com/topic/37350-emailing-signup/#findComment-178549 Share on other sites More sharing options...
obsidian Posted February 6, 2007 Share Posted February 6, 2007 First of all, you ought to try and modify your email headers to represent a valid email address and from name. Usually, you can do something like this, and it helps some: <?php $to = ''; // recipient's address $sub = 'Subject'; // email subject $msg = 'Message'; // email message $hdr = "From: My Name <[email protected]>\r\nReply-To: [email protected]"; mail($to, $sub, $msg, $hdr); ?> This alone will not always work, but it's a good start. Link to comment https://forums.phpfreaks.com/topic/37350-emailing-signup/#findComment-178553 Share on other sites More sharing options...
supanoob Posted February 6, 2007 Author Share Posted February 6, 2007 that actually worked but none of my $password etc show it actually echoes $password Link to comment https://forums.phpfreaks.com/topic/37350-emailing-signup/#findComment-178570 Share on other sites More sharing options...
alpine Posted February 6, 2007 Share Posted February 6, 2007 Its all about how you define your message string, look at this: <?php $password = "12345"; echo $password; // prints 12345 echo '$password'; // prints $password echo "$password"; // prints 12345 ?> Link to comment https://forums.phpfreaks.com/topic/37350-emailing-signup/#findComment-178577 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.