Why doesn't my code send emails?


I think your code is good enough to send email, but you need SMTP server to send the mail (which you has not specified), in case you have a mail server , the easy solution is install SMTP module which needs the SMTP server address and your are good to send email.

This module allows Drupal to bypass the PHP mail() function and send email directly to an SMTP server. The module supports SMTP authentication and can even connect to servers using SSL if supported by PHP.

Tags: Emails

Similar questions

How to send notification emails in a journal style "Newsletter"?
I am working on replace an existing, custom built website with a Drupal 7 site. In the existing website I've coded a more or less smart email-notification system which I like to re-build for the Drupal version (if possible). The website allows members to create/edit/cancel events, participate/decline events, comment events etc. If any of these acti...
Send site emails to multiple administrators
Simple question, though I cannot find the answer anywhere -- How does one specify multiple addresses for the primary administrator account in Drupal 7? Put another way -- how does one make Drupal administrator emails go to multiple people, without setting up a bunch of forwarding filters on the mailserver? Thanks!
How to use drupal_mail() to send emails with custom template
I would like to use the drupal_mail() function to send out emails but with a custom HTML template so that they are in keeping with my website design but I am a complete newbie to hooks and modules etc., so I'd appreciate some sort of explanation or beginners guide please. I can create the template myself, I just need to know how to get drupal_mail(...
How do I Send HTML Emails via Rules?
The Rules module provides a value field for the "send mail" action. Since I also have the PHP filter module, I have the ability to add PHP code there. I want to add HTML formatting to my email. Is there a more "correct/Drupal way" of sending HTML based emails via rules other than pasting my code there? The pet module looks like a decent candidate, ...
What are the performance implications of running a frequent simplenews cron task to send emails?
In the Simplenews docs there is the following tip: The Elysia Cron module (http://drupal.org/project/elysia_cron) can be used to start the simplenews cron hook more often than others, so that newsletter are sent faster without decreasing site performance due to long-running cron hooks. This is great because it will clear the mail spool without wait...
Add VBO checkbox to send Bulk emails in Admin
We are using Enterprise Event module in Drupal 7. I checked the Views and module files but not able to locate the file as from where Manage Registration Page is formed. Please guide me how I can add VBO checkbox to send Bulk emails in Admin > Content > Event > Edit > Manage Registration Tab. I am using enterprise event module in which people regist...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.