Simple Mailing in Drupal:
<a href="mailto:?subject= Your Subject Here - <?php
print 'http://www.yoursite.com/'.$_GET['q'];?>">Email this page</a>
There 're usually three different ways of configuring drupal email functionality:
- The first and easiest way is to configure Drupal to use the operating system 's sendmail.
This kind of configuration is usually done automatically during the installation of drupal, you might not notice it during your drupal installation.
If you could receive mail after the installation of drupal, CONGRADULATIONS! your web hosting server is capable of sending email without any authentication. enjoy it and you could just forget everything I write here.
- Configure Drupal to use your web hosting 's SMTP server.
If you could not receive mail after drupal installation, so you might be in the same situation as I do, which means that you have to configure drupal to use SMTP authentication in order to send mail.
You have to create the mail accout in your web hosting cpanel and configure drupal according to our previous article here.
It works most of the time but I never find out why it doesn't work sending email to Gmail account, might be it 's depend on the web hosting company 's SMTP server 's capability that we might never know!
- Configure drupal to use external SMTP server (e.g. Gmail 's SMTP server)
It seems that this is the final choice for me right now, First We have to register one Gmail account and configure SMTP Authentication just as options 2, We only need to replace the SMTP authentication server informatio using Gmail 's SMTP server that you could find in your Gmail settting.