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="kikkofergae@hotmail.co.uk"; mail($t_mail,$subject,$message,'Activation at xxx.'); Quote Link to comment 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? Quote Link to comment 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... Quote Link to comment 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 Quote Link to comment 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... Quote Link to comment 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 Quote Link to comment 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! Quote Link to comment 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... Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Vigilant Psyche Posted May 14, 2008 Author Share Posted May 14, 2008 Oh cool! Thanks lol. Quote Link to comment 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? 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.