Jump to content

Sending Email without user interaction


magnetica

Recommended Posts

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

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

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]";

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.