Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > General Articles
Using free email SENDGRID for SMTP email via vbulletin forum
mdawg's Avatar
mdawg
Join Date: Mar 2009
Posts: 363

 

United States
Show Printable Version Email this Page Subscription
mdawg mdawg is offline 09-30-2016, 09:00 PM

I am running vbulletin 5 (currently 5.2.4). I am on a hostgator shared cpanel Linux server.

[Editors Note- The instructions in this article should be the same for all current versions of vBulletin. (VB 3.x, 4.x, and 5.x.)]

The issue I was running into was that the new registration emails and most other emails for my forum members being sent out via vbulletin to all hotmail and outlook recipients, were simply not being received. So new forum registrants were constantly complaining that they were never receiving the activation emails, not even in their spam/junk folders.

Oddly, test emails sent at
Admin CP -> Maintenance -> Diagnostics
WERE getting through to all recipients, including to hotmail and outlook recipients. But the initial new registration (activation) emails, were not getting through.

I determined that this is because hostgator has somehow been blacklisted for hotmail and outlook, and when on a SHARED hostgator server, even using
Admin CP -> Settings -> Options -> Email Settings
and setting it for SMTP and for emails to come straight from your forum (webmaster@myforum.com), STILL all emails were not truly coming from my forum's URL but rather from hostgator mimicking my server. Apparently it is a well know issue that it is almost impossible to send emails to Microsoft owned email addresses (hotmail/outlook/live...) using a shared host or shared email server. They only accept emails from email servers that perfectly match the domain sending them.

I was also having a strange issue which was that emails from my forum sent via SMTP to GMAIL accounts showed as coming from "PayPal" simply because the word "PayPal" is part of my forum homepage title. This was causing problems of its own because people were ignoring and deleting emails marked as coming from "PayPal" because they looked like SPAM.

---

THE SOLUTION I found was to use a free email account from SENDGRID.

I converted to using Sendgrid for smtp (FREE 12K emails per month account) at my forum, and the tests I did show that emails including registration ones came through fine to a hotmail account, and also that emails that came through to gmail came through fine not erroneously marked as coming from "PayPal."

The general way to set up a SENDGRID account at vbulletin is to go to

Settings/options/Email options
and set SMTP Email to YES

then
Change your SMTP username and password to your SendGrid credentials
(You may create new ones
Settings/Credentials
or just use your username and PW that you use to access the sendgrid account)
(You may also create an APIKey and PW
Settings/API Keys
and use these same as username/PW)

Set the server host name to smtp.sendgrid.net

Use ports 25 or 587 for plain/TLS connections and port 465 for SSL connections


A few additional Sendgrid Settings are needed to function best with vbulletin:

At Sendgrid I went ahead and whitelisted the domain.
Settings/Whitelabels/Domains
I used the subdomain name default.myforum.com
After whitelisting it you must go in to your server cpanel and add these CNAME records, and then validate this domain back at Sendgrid.
If you do not whitelist your domain in this way, all emails send out by your forum will appear to come from Sendgrid instead of from webmaster@myforum.com

At Sendgrid I also whitelisted all the email links
Settings/Whitelabels/Email Links
using the subdomain links.myforum.com This is a similar process to the above and avoids Sendgrid sticking its name into the URL links in your emails.

I could not whitelist any IP address because on a free Sendgrid account you don't get this option. But this doesn't seem to be a problem and emails are getting through. (If you get an upgraded Sendgrid account, you will be assigned an IP address, and you may whitelist this through a process similar to that described above for your Domain and Email Links.)

HOWEVER, as far as Email Links, I didn't really like the long long URLs that Sendgrid creates even with the whitelisting, and wanted URLs in my emails to appear simply exactly the way they were created originally, so I went into Sendgrid Tracking
Settings/Tracking/Click Tracking
and inactivated Click Tracking so that the URLs originating from the forum remained intact.

Another Sendgrid setting I had to make Active was in
Settings/Mail Settings/Plain Content
In Mail Settings - "Plain Content" (Convert your plain text emails to HTML) - without this setting made green/active, the test emails sent by the forum at Maintenance/Diagnostics/Email were arriving improperly formatted.


So far, so good. As far as the 12K limit, that's more than enough for my new user registrations, even figuring an average of three emails per registrant (Activation, welcome, and new private message), but then also the system will send out an email for each private message too and for some users for posts made in threads they follow, etc. But I am thinking 12K will be enough.

For those of you on a shared server, especially at hostgator, and for anyone having trouble getting new user registrations through especially to hotmail and outlook, Sendgrid may be the solution. It is working for me.
Reply With Quote
  #2  
Old 10-01-2016, 11:25 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the great instructions on setting up SENDGRID free email. 12k emails a month is probably enough for most small forums. Even if I had to send more I'd rather pay a little bit for quality email delivery, it's just better than a web host or Gamil can provide.
Reply With Quote
  #3  
Old 07-16-2017, 04:40 PM
Scandal's Avatar
Scandal Scandal is offline
 
Join Date: Dec 2005
Location: Athens / Greece
Posts: 409
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any other experiences from SendGrid?
I have in mind to take a premium account (100.000 emails/month) for ~$20.
If you have in mind also any other relative service (SMTP e-mail), let me know.

The main problem is that with Microsoft accounts (@hotmail etc).
You cannot do something else since the 50% of your members have Microsoft accounts as registration e-mails.
Reply With Quote
  #4  
Old 10-24-2017, 12:11 AM
alzaabi alzaabi is offline
 
Join Date: Mar 2012
Location: Sweden
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I came here to correct some info.

by the way if you want the service to work
on vbulletin SMTP your site should be hosted with (VPS+WHM service)
OR ask the hoster to change or correct your nameservers,
then you can add all the records on your VPS cPanel ( delete the conflicted records and add Sendgrid Records) and whitelables the subdomain and the email in Sendgrid site
Finally go to "Setup Guide" in Sendgrid site and create the API Key , add these to vbulletin SMTP with your Sendgrid mail , all activation links will work.
and all should work.

Remember sending emails throught vbulletin mail box will be little slow on ALL SMTP services
but asking for activation links OR forgot your password links will be faster.
Reply With Quote
  #5  
Old 02-22-2018, 03:57 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just FYI:

Like most people, I have the problem of bulk email like newsletters going to spam folders, especially with gmail, the Microsoft webmail group (hotmail, outlook.com, etc.), and yahoo. I have no history of being blacklisted and no currently known blacklisting.

I figured I'd give this a try to see if it helped.

Short answer/bottom line: No. It made no difference at all for those email providers.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:37 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04201 seconds
  • Memory Usage 2,242KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_box_bit
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete