SMTP stands for Simple Mail Transfer Protocol. We can say its carries the electronic mail of the world. SMTP is the most important technical aspects of the whole process of email dispatch and delivery. SMTP is part of the application layer of the TCP/IP protocol which used in sending and receiving e-mail. SMTP works closely with something called the MTA ( Mail Transfer Agent) to send your communication to the right computer and email inbox.

Why should you use SMTP for your Email :

There is many reason to use SMTP, first is that – SMTP provides a set of codes that simplify the communication of email messages between email servers. When you send a message out, it’s turned into strings of text that are separated by the code words (or numbers) that identify the purpose of each section and simply SMTP provides those codes, and email server software is designed to understand what they mean.

If you want to use the different From: address, like your google mail for example. In this case using local mail sever will result in your mails marked as spam by most spam-filters (they compare the From header and the real server that sent the mail)

SMTP usually is implemented to operate over Internet port 25. An alternative to SMTP that is widely used in Europe is X.400 . Many mail servers now support Extended Simple Mail Transfer Protocol (ESMTP), which allows multimedia files to be delivered as e-mail.

If you have lots of users and need to send lots of mails then your server may be marked as spam source and besides it will be unnecessarily loaded. Using sendgrid or similar external mail server is a top solution.

How to use SMTP :
Google’s GMail SMTP server is a free service for anyone who has a GMail account. You can use this free SMTP server to send emails from your favourite web application.If you don’t have a GMail account, you can create one at the GMail account creation page.Then all you need to do is configure your mail client to use GMail for outgoing mail server. The details you should use are:

1. SMTP server (i.e., outgoing mail): smtp.gmail.com
2. Use Authentication : Yes (this can be TLS or SSL depending on your mail client)
3. SMTP Username : Your full Gmail or Google Apps email address (example@gmail.com or example@yourdomain.com)
4. SMTP Password : Your Gmail or Google Apps email password
5. SMTP port: 465

Google automatically rewrites the from line of any email you send via its SMTP server to the default Send mail as email address in your Gmail or Google Apps email account Settings. You need to be aware of this nuance because it affects the presentation of your email, from the point of view of the recepient, and it may also affect the Reply-To setting of some programs.
In your Google email Settings, go to the Accounts tab/section and make “default” an account other than your Gmail/Google Apps account. This will cause Google’s SMTP server to re-write the From field with whatever address you enabled as the default Send mail as address.

Workaround :
If occurred any error messages (Permission denied or Connection timed out), then you should
Try login with your google account here to unlock it for application access.

Then Click the “Continue” button to Allow access to your Google account.
Gmail password error :
When setting up POP3 fetching to a Gmail account and clicking the “Test connection” button, you see an error saying:
Password error: [AUTH] Web login required: https://support.google.com/mail/bin/answer.py?answer=78754

What is causing this?
This happens because Google detects your login as suspicious. For example, because your server is located in a different country than you.

1. Open your browser
2. Login to Google mail using the web interface at www.gmail.com
3. At the top of the page you will see a message saying:
Google prevented suspicious attempt to sign into your account. Was it you?
4. Click the “Was it you?” link
5. Click the “It was me” button to confirm that you are the one trying to login to the account.
6. Go to Google unlock captcha
7. Login and click the “Continue” button to allow application access to your Gmail account

Sending Limits :

Google limits the amount of mail a user can send, via its portable SMTP server. This limit restricts the number of messages sent per day to 99 emails; and the restriction is automatically removed within 24 hours after the limit was reached.

Tags: , ,