Reputation: 11
I am developing a basic Facebook app that is hosted on Hostgator. Here is the link of my app : https://apps.facebook.com/191327857669038/.
The app is supposed to send the completed form data to the respondent and a copy to App Admin, but the emails are not being sent.
I used the following PHP script to test whether it is sending a test email or not. I added this script to my “index.php” page, and after committing all the changes, I tested it, but it didn’t work.
<?php
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$email = "[email protected]" ;
if (mail($to, $subject, $body,"From: $email")) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
How can I send email from my Facebook app effectively?
Upvotes: 1
Views: 363
Reputation: 6608
I think, for Yahoo, you need to login with your credentials and make use of their SSL port to send emails. So you need to use a better mailing system.
Try using the PHP Mailer: http://phpmailer.worxware.com/
Here's an example on using Yahoo SMTP to send email using PHP Mailer: http://faq.pctrickers.com/php-send-yahoo-email-using-smtp/
Worth reading - Yahoo SMTP/POP settings: http://help.yahoo.com/l/in/yahoo/smallbusiness/bizmail/pop/pop-33.html
Hope it helps :)
Upvotes: 1