Vigilant Psyche Posted May 14, 2008 Share Posted May 14, 2008 Do any of you see why this doesn't work? The email simply doesn't get recieved (yes I've checked junk): //$t_user is from a form... $subject='Something Completely Different'; $message="<a href='www.xx.xxx.com/index.php?body=activate&name="."$t_user"."'>Click here to activate...</a>"; $t_mail="[email protected]"; mail($t_mail,$subject,$message,'Activation at xxx.'); Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/ Share on other sites More sharing options...
jonsjava Posted May 14, 2008 Share Posted May 14, 2008 first question: is it a windows or linux server second question: if it's linux, do you have an MTA on it? Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540963 Share on other sites More sharing options...
Vigilant Psyche Posted May 14, 2008 Author Share Posted May 14, 2008 It's linux and from control-f ing phpinfo() i conclude that it doesn'y have MTA... EDIT: Apparently sendmail_from has "no value" though... Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540967 Share on other sites More sharing options...
kenrbnsn Posted May 14, 2008 Share Posted May 14, 2008 You are using the wrong syntax for the mail() function. It is <?php mail($to,$subject,$message,$headers,$additional_parameters); ?> The $headers and $additional_parameters are optional. Read the fine manual Ken Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540974 Share on other sites More sharing options...
Vigilant Psyche Posted May 14, 2008 Author Share Posted May 14, 2008 I don't see how mine is different... appart from the missing additional_parameters... Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540977 Share on other sites More sharing options...
kenrbnsn Posted May 14, 2008 Share Posted May 14, 2008 You have <?php mail($t_mail,$subject,$message,'Activation at xxx.'); ?> The string 'Activation at xxx' is not a valid header. Ken Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540979 Share on other sites More sharing options...
Vigilant Psyche Posted May 14, 2008 Author Share Posted May 14, 2008 Ah! Excellent. I thought a header was just a subject-esque value... I shall look into this. EDIT: Thanks! Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540980 Share on other sites More sharing options...
Vigilant Psyche Posted May 14, 2008 Author Share Posted May 14, 2008 OK thanks... next question: Is there a way to put a link into the mail... when it comes out in the message (hot mail), it actually shows: <a href='www.ne.simtoz.com/index.php?body=activate&name=[a username]>Click here to activate...</a> Instead of parsing the html... Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540993 Share on other sites More sharing options...
DarkWater Posted May 14, 2008 Share Posted May 14, 2008 You need to use HTML headers. Google it. Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540994 Share on other sites More sharing options...
Vigilant Psyche Posted May 14, 2008 Author Share Posted May 14, 2008 For the second Q? Or did you post that without reading the parsing Q? Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540996 Share on other sites More sharing options...
DarkWater Posted May 14, 2008 Share Posted May 14, 2008 The second question. =P You need to use HTML headers for the e-mail client to parse the HTML. Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540997 Share on other sites More sharing options...
Vigilant Psyche Posted May 14, 2008 Author Share Posted May 14, 2008 Oh cool! Thanks lol. Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-540998 Share on other sites More sharing options...
Vigilant Psyche Posted May 14, 2008 Author Share Posted May 14, 2008 Hmm... I can't figure out how to do this with headers... ??? Can I get a hand? Link to comment https://forums.phpfreaks.com/topic/105598-mail-doesnt-work/#findComment-541008 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.