Back to HostIgnition Request New Article Contact Us

Member Login

  Main Page >>  PHP/Perl >>  How do I send email using PHP/Perl?

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:" in the $additional_headers field.

e.g. mail("", "Subject", "Message", "From:") ;

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 assist you:



Copyright (c) 2008 HostIgnition
Virtual Web Hosting | Dedicated Servers | Resellers | About Us | Contact Us