In this tutorial I’m going to show you how to setup a PHP email form with Yahoo hosting. One of the things I’ve found with Yahoo hosting and using PHP to send emails is that there are quite a few steps you have to go through in order to get it working. But lucky you, I’ve figured it all out and laid out the steps below.
Also you should note that Yahoo has a max limit on the number of emails that can be sent, only 250 emails every 24 hours to recipients that are outside any emails not associated with your domain name (IE: emails that don’t go to name@yourwebsite.com). And you can only set the email’s “from address” as an email at your domain name (example: name@yourdomain.com).
Here are the things you will need to complete this tutorial:
- Yahoo web hosting login details (username and password).
- From email address set up at the same domain name as your emailing from.
How to Send PHP Email with Yahoo Hosting:
- Sign in to Yahoo web hosting “Small Business”. You’ll need to click on the Small Business and then login there.
- Next click on the Create & Upload tab.
- Now scroll down to the “Other Site Building Tools” section. Sometimes this section will be closed and you will not see it’s contents. You need to click on the arrow to open it’s contents and then click on the PHP/Perl Mail link within this section’s content.
- On the next page under the “PHP/Perl Mail Setup” section on the right hand column enter in your email address you would like the form to send to. Then click the “Set Default” button.
- Now you can use the PHP mail() function to send email but you will have to use the from address as the one you set in the above step. The PHP mail() function is a function that sends emails using PHP coding. Here is an example of it’s usage.
<?php $to = 'Your_Email_Here@Your_Domain.com'; $subject = 'Subject_Goes_Here'; $headers = 'FROM: <Your_Email_Here@Your_Domain.com>'; mail($to, $subject, $message, $headers); ?>
For more on the PHP mail() function visit the PHP manual, PHP: mail – Manual
Useful Related links:
Yahoo’s tutorial on how to send email using php: How can I send email with PHP?
0 Comments