magnetica Posted February 28, 2007 Share Posted February 28, 2007 Ok I would look on google but dont have a clue what to look for! What I wish to do is automatically send an email when a user clicks a link E.g. users clicks a link for a broken link and it sends a email notifying me How would i go about this? If im not being clear please let me know Link to comment https://forums.phpfreaks.com/topic/40511-sending-email-without-user-interaction/ Share on other sites More sharing options...
magnetica Posted February 28, 2007 Author Share Posted February 28, 2007 This is what i have: <?php $msg.="Name :\t sean"; $msg.="Telephone :\t test 123"; $msg.="Email:\t [email protected]"; $to="[email] [email protected]"; $subject= "Application Form"; $headers.= "Reply-To: [email protected]"; $headers.="MIME-Version: 1.0\r\n"; $headers.="Content-type: text/html; charset=iso-8859-1\r\n"; $headers.="From:[email protected]"; mail($to,$subject,$msg,$headers); ?> Whats wrong with it Link to comment https://forums.phpfreaks.com/topic/40511-sending-email-without-user-interaction/#findComment-195984 Share on other sites More sharing options...
mjlogan Posted February 28, 2007 Share Posted February 28, 2007 try error_reporting(E_ALL); at the top of your page, and see if it outputs any errors. Link to comment https://forums.phpfreaks.com/topic/40511-sending-email-without-user-interaction/#findComment-195990 Share on other sites More sharing options...
magnetica Posted February 28, 2007 Author Share Posted February 28, 2007 Yes this is the error I get: PHP Warning: mail(): SMTP server response: 501 5.5.4 Invalid Address in D:\home\flash-online-games.co.uk\wwwroot\page_redirect.php on line 18 And line 18 is: mail($to,$subject,$msg,$headers); So im guessing is something here but dont know what: $msg="Name :\t sean"; $msg="Telephone :\t test 123"; $msg="Email :\[email protected]"; $to="[email][email protected]"; $subject= "Application Form"; $headers= "Reply-To: [email protected]"; $headers="MIME-Version: 1.0\r\n"; $headers="Content-type: text/html; charset=iso-8859-1\r\n"; $headers="From:[email protected]"; Link to comment https://forums.phpfreaks.com/topic/40511-sending-email-without-user-interaction/#findComment-195992 Share on other sites More sharing options...
ashly Posted February 28, 2007 Share Posted February 28, 2007 You have given: $to="[email] [email protected]"; this should be: $to="[email protected]"; pls try it and let me know if there is any result? Link to comment https://forums.phpfreaks.com/topic/40511-sending-email-without-user-interaction/#findComment-196033 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.