How do I send email using PHP/Perl?
PHP provides a handy function called mail for sending emails. The syntax of usage is:
bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )
To specify the "From" field (i.e. who is sending the email), specify "From: your@email.com" in the $additional_headers field.
e.g. mail("my@email.com", "Subject", "Message", "From: your@email.com") ;
For Perl, you can use the Net::SMTP module for sending emails. More information could be found at:
http://search.cpan.org/~gbarr/libnet-1.21/Net/SMTP.pm
You will need to use the auth( $email_account, $password ) method to authorize yourself in order to send an email. You can use any of your email accounts for authorization.
Got Questions? Need Assistance?
Submit a Support Ticket
Login and submit a support ticket to have our technical support
assist you:
|
|
|