In Drupal 7 when you configure a contact form it does not allow you to send mail on external addresses for example if you put email id other than your domain name. It shows a warning message as below
Unable to send e-mail. Contact the site administrator if the problem persists.
Solution of this issue is to configure SMTP settings on your drupal site and that will allow you to send mail.
Listing down the steps that can be used to setting up these. But there is high risk involved for your gmail account. Once you apply these settings you might received mail from google as below
*********************************************************************************
Hi XXXXX, We recently blocked a sign-in attempt to your Google Account [XXXXX@gmail.com].
Sign-in attempt details
Date & Time: Tuesday, 2 June, 3:07 p.m. GMTLocation: Unknown
If this wasn't you
Please review your Account Activity page at https://security.google.com/
If this was you
You can switch to an app made by Google such as Gmail to access your account (recommended) or change your settings at https://www.google.com/To learn more, see https://support.google.com/ Yours sincerely, The Google Accounts team |
*********************************************************************************
It will land you on page with below information
Hence Please be sure if you want to use SMTP configuration with above risk.
- Please download SMTP authentication module from link as mentioned. Please search with "Drupal SMTP" If you don't see on below link. there could be situation that you read this after a long time - https://www.drupal.org/project/smtp
- Now please download this module and enable it. Hope I don't need to explain how to enable modules in drupal. After enabling this module go to Admin > Configuration > SMTP authentication support and set the following values:
- Turn on the module at the Install options fieldset at the top.
- SMTP server settings:
- smtp server: smtp.gmail.com - This would be by default
- smtp backup server: leave blank.
- smtp port: 465 - This would be by default
- use encrypted protocol: select "use SSL"
- SMTP authentication:
- Enter a valid Gmail email address and password. - Please make sure you have understood risk involves before allowing this.
- Email options:
- Set the same email address that you used at SMTP Authentication.
- Send test email: set an email to receive a sample email.
- Enable debugging: yes.
Click on submit and verify that the email was submitted and that you received it. You can enable/disable debugging as per your need so if you want to see output you can keep debugging on. Thats all.
Hope this would be quite useful. Please comment if you still face an issue. We would be happy to help you.
Thanks ---- Happy Learning......!!!
No comments:
Post a Comment