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: email@example.com" in the $additional_headers field.
e.g. mail("firstname.lastname@example.org", "Subject", "Message", "From: email@example.com") ;
For Perl, you can use the Net::SMTP module for sending emails. More information could be found at:
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