Why mailgun and not a simple SMTP server - smtp

When I do mass mailings, many of the recipients complain that my mails end up in their spam folder. How can I prevent this. Should I perhaps use Mailgun? Currently I send the mails via a simple SMTP server.

Related

How to configure SMTP to save send mails?

can you please tell me how to configure SMTP to save send mails in Sent Items folder of my Mail.
NOTE: I am using yahoo mail credentials to send mails.
That is not possible using SMTP only.
SMTP is just for message delivery, it has no knowledge of your inbox and its folders tructure.
When you send a mail using your mail client (Outlook, phone, gmail, etc), it will :
use SMTP to send your mail
then use a different protocol (usually IMAP or MAPI) to move the message to your "Sent items" folder.
There are some exceptions : some mail providers will automatically copy to your sent items all messages sent by your account through their SMTP server. I believe gmail does that. that's not as easy as you maythink, since one must ensure the message is not ciped twice (once by the email client, another one by the SMTP server).

can php send email without mail server installed in server?

I know we can send email from php using smtp servers on different hosts or if there is local smtp server installed. What I want to know is can php send email without any local or remote smtp servers? I have heard about sendmail program but can it function without any mail server installed in the server?
At some point you have to talk to a SMTP server. Sending via a SMTP server on the local host is the cleanest option and the most likely to succeed at getting through spam filters.
What a mail server does is quite complex. Let's take your average e-mail as it arrives from your e-mail client to your e-mail server with an outbound host as the destination:
The server checks your user account and makes sure it is valid.
The e-mail goes into a queue either separately for each recipient or as one message (depends on the server).
The server finds the e-mail in the queue and processes each recipient address. This requires a DNS lookup for a MX record for each target domain.
The e-mail server connects to the address specified by the MX record and delivers the e-mail to it as one does over SMTP.
On success, the e-mail is removed from the queue. On failure, the e-mail may remain in the queue and the server will try again later (exponential backoff - see greylisting) or be put in the mail queue to be returned to you when you check your e-mail via POP3 later.
The next e-mail server in the queue then repeats the above until the final server receives the e-mail and sits in the recipient's mailbox.
Doing that within PHP is possible, but I don't recommend it. MX record lookup can be tricky because people do all sorts of non-compliant things that mail servers tolerate. Plus, your script might time out while attempting to connect directly to the target SMTP server. Some servers are also configured to "greylist" e-mail, which means the e-mail will initially be rejected but would be accepted later (e.g. 30 minutes is not unusual). The average PHP script won't be able to handle that scenario.

Setting up SMTP mail server. Done with installing SMTP. Now what?

I want to host my own mailserver using my own domain. So far I can see that SMTP needs to be installed and the DNS record has to be modified to point to my mailserver. So far so good. But what about mailaccounts? How do I create mail#mydomain.com with username and password so I can start receiving emails in outlook?
What more does it take to be able to receive mails in outlook now that im done with installing SMTP on my server?
Installing just the smtp service isn't going to get you what you need. In order for users to get their mail you'd need a pop server, or an IMAP server or and exchange server.
What you need is a seperate mail hosting package. Something like Imail from Ipswitch. Or exchange from Microsoft.
SMTP is simply a mail transfer mechanism, it will receive emails for remote SMTP servers and then try an deliver them. It does not handle mailboxes or email accounts, for this you will need a POP3, IMAP or Exchange server.

Gmail does not list sent items if mail sent from custom smtp server

We have our own company's smtp server.
When we send mails using the above smtp server, the mails do not list in the gmail's sent items.
The mail is sent using asp.net
What can be done?
Instead of using your own SMTP server, use the SMTP server from GMail. How else can Gmail know that you have send an email.
You have to supply credentials to use Google's SMTP server, so you must store the user's username and password (from Gmail).

Mails Sent via SMTP should get reflected in the Sent folder on the Email Server too? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
When using SMTP to send mails (email client or via a script), mails are normally not seen in the Sent folder on the email provider's server.
But it does get reflected in the Sent folders of Gmail (Google Apps).
Isn't it mandatory to save the mail in the Sent folder of the server too ?
I consider Sent mails as my log for mails sent automatically.
Usually, an e-mail client such as Microsoft Outlook will receive messages via IMAP4 and send messages via SMTP.
I am unaware of many mail servers that automatically save mail sent through them via SMTP in the server-based Sent folder besides Gmail/Google Apps.
Typically though, once an IMAP4 connection (as opposed to POP3) to the mail server is created for the receipt of incoming mail, one can set the e-mail client to copy sent messages to an IMAP folder. Alternatively, sometimes an automatic BCC can be set up from the e-mail client.
Copying outbound messages to an IMAP folder would cause the synchronization of the local IMAP folder with the mail server and therefore provide a similar effect to the functionality of Gmail/Google Apps. However, in this case, each message sent via SMTP is transferred to the mail server twice:
1) The sending via SMTP.
2) The synchronization between local folder storage in the client and the corresponding folder on the mail server.
See: http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol#Disadvantages
No it is not mandatory, there's two mail protocols, POP3 (Post Office Protocol version 3) and IMAP (Internet Message Access Protocol), when using an email that talks in POP3 protocol, there is no way of telling POP3 to store the email sent...
The workaround was coded and crafted into an email client such as Outlook, Thunderbird, to name but a few, that are using the POP3 protocol.
However, when an email client talks in IMAP protocol, the email server knows where to store it, consider it in layman terms that the IMAP is an enhanced form of the POP3 protocol.
Thus any action carried out on your email client, such as sending mail, will get stored in the designated folder on your machine by your email client, ALSO, the server will dutifully store it in the folder on the server, as a result of the synchronization between your email client and the server.
Your mail provider has the choice of multiple ways to provide you access to email. Two of the more common ones are pop3 and imap. It sounds to me like you have pop3, which just pushes emails to the client and forgets about them.
You could have folders for your email, including sent messages, if your provider provides you with an imap server. Otherwise, your option is to change mail providers.