Symfony swiftmailer delivery confirmation - symfony

I'd like to send emails with swiftmailer and I need confirmation of sent email and delivered.
By default swiftmailer saves emails in cache and sends them in background to prevent waiting user for sending emails.
How can I achieve confirmation of sent emails?

I think there is no way to get 100% certainty. A mail can fail to be delivered for many reasons which has nothing to do with your application. A few suggestions though:
1) You can send all mails in BCC to another address. You can do this by combining delivery_addresses and delivery_whitelist configuration parameters https://symfony.com/doc/current/reference/configuration/swiftmailer.html#delivery-whitelist
2) You can use a specific mail server under your control, so you can check its queue / logs to see which mails have been actually delivered.
3) You can set a "Read receipt" to all outbound emails.

Related

Contact Form 7 showing sent message but not receiving email especially Google aps Domain Emails

Experiencing issue with WP plugin, contact form 7. When I fill in the form and submit, I receive a success message stating it was sent but I received example#gmail.com but not received example#companyname.com google ap's emails yet I don't receive it in my emails.
This probably has something to do with your server configuration. Can you try sending a mail using PHP's mail function? Is that also not working?
The CF7 plugin also uses this function. What this function does is it sends the mail request to the server. If that request was successful (regardless of whether the mail was send successful) it will return true. There is no other way using this function to check if the mail has actually been sent successful. That's why the CF7 plugin can say that the mail was send correctly even if it hasn't been send by the server.

Concrete5: can't send email from form

I tried 2 SMTP servers, both times I can send test email from dashboard, but sending it from a form on front-end doesn't work. I use default form block and I tried to send email on different boxes. Is there any error logs that I can check? My C5 version is 5.7.5.8.

Email Goes to junk in Hotmail

Email is sent using Amazon simple Email service form my website. When an email is sent to any Yahoo or Gmail address, it is delivered to Inbox; but when it is sent to Hotmail,it is delivered to Junk.
Why only Hotmail Treats my email as junk?
When an external user sends email messages to an Outlook.com account,
SmartScreen® filter technology evaluates the content of the messages
and assigns each message a rating based on the probability that it is
a junk email. This rating is stored as a message property called a
spam confidence level (SCL) within the message itself. The SCL rating
stays with the message as it is sent to other anti-spam protection
layers within Outlook.com. Rules inside Outlook.com are set to handle
email messages with various SCL ratings. If a message has an SCL
rating lower than a certain threshold, it is considered to be spam,
and a rule then deletes the message rather than sending it to the
user's junk email folder. If the message has a higher SCL rating than
the threshold, the email is delivered to the user's junk email folder
rather than to the inbox.
https://mail.live.com/mail/junkemail.aspx
Not all the Anti-Spam system depends only on 3rd party blacklists. Major email service providers builds their own reputation table in addition with the use of major 3rd party blacklists like spamhaus, barracuda etc. In your case, you are using Amazon SES to send mails.
I, myself found enormous marketing mails coming from Amazon SES. If the reputation of your email service provider is bad in hotmail then it may trigger the suspicious level of your mail regardless of your email service provider reputation at other blacklist providers. In addition to this, if your subject, body content contains some suspicious words then your mail will end up in junk folder.
Most emails sent from third party applications such as Wordpress, Joomla, or Amazon get diverted to junk and sometimes they fail and get stuck behind a security layer. I know for a fact with Wordpress Contact Form 7, this is the case many times.
After so many years and finally attending a seminar for this particular issue, I finally was able to solve this problem specifically for Hotmail (Outlook.com).
Before you do anything ensure your SMTP settings in your web config file (ASP.NET) are written correctly or in case of plugins (Wordpress) make sure the fields are filled correctly. This means ensuring these are the settings you are using for Outlook:
From: your email ("asdf#outlook.com")
From Name: "Your name or company name"
Host: smtp.live.com
Type of Encryption: TLS
SMTP Port: 587
SMTP Authentication: Yes
Username: Same you use to login (usually the complete email address)
Password: Enough said there
IMPORTANT - Send a test email even if it fails. The point is to trigger an activity in Outlook and have them flag it as an
unauthorized connection
Now, to the fix:
Go to Outlook.com
Login
go to Account Settings
Choose Security & Privacy
Click on "See my recent activity"
The most recent activity should be the fail attempt. Authorize it as a trusted connection.
Done!
Re-test and you shall see your emails showing in the inbox as an authorized connection. Doing these steps let Outlook know that your emails from Amazon are legitimate connections and not Amazon trying to spam your account with solicitations etc.
Mostly it is a email service provider specific thing but you can do below checks
Ensure valid sender email address
Try not to use keywords like gift, prize etc. which are preferably spam activities
Try using https://litmus.com which may help on this/ rendering email in different email clients

how to send email in wordpress not using plugin

I am new developer in wordpress. I wanna send email not using plugin . i use function wp_mail as shown below:
wp_mail('myname#yahoo.com', 'subject', 'message', $headers);
when i use yahoo email myname#yahoo.com i can send 'subject,messege' to my yahoo account. but when i use gmail email xxx#gmail.com i can't send 'subject,messege' to my gmail account.why can not send with gmail account? pleas help me !
As you have problem with only Gmail we can infer that it is not the problem with 'sending' but with 'receiving'. Something is blocking your mail at the receiving end. Following things can be done to ensure better receiption.
Use a real address. Dafult is wordpress#yourdomain.com. This can be filtered with wp_mail_from.
Use SMTP to send email. You can do this with phpmailer_init action.
Disable headers.
Contact hosting providers and confirm that your server is not blacklisted by Gmail.
If you used wp_mail to send your message, without a plugin, this means you didn't use Google's SMTP server. And you're wondering why you didn't receive it at your gmail account? Because you basically forged your from address. Of course Google rejected your email.
The only way to get that to work is to use authentication when sending your mail. That means connecting to the smtp.gmail.com server and in 2015 that means using OAuth 2.0 unless you want to deal with another can of worms.
Check out Postman SMTP for sending mail in WordPress.
Here's some reading for you to do: http://googleappsdeveloper.blogspot.no/2014/10/updates-on-authentication-for-gmail.html

Check if mail sent is in recipient's inbox/junk in asp.net using C# ?

I am developing a software but for that I want to know as if i send an email then how can i check the sent email is in recipient's inbox/ Junk.
I am using AsP.net and c# technology for this
Please reply
You can't detect what is done with the email once it is delivered to the users inbox other than requesting a delivery receipt and a read receipt but the user can opt out of these.
The best way to avoid being marked as spam is to use a trusted third party service such as Campaign Monitor or MailChimp.
Failing that you should make sure that your email has a proper from address set, that you have set up SPF records to allow the sending IP official permission to send email on behalf of the from domain, keep your html to content ratio reasonable and if possible use an email address that your customers have already received an email from before so that there is a higher chance that the address is already in a whitelist.
You really can't because there are many different email spam solutions out there and they don't send a status back saying whether they delivered the email to the recipient or not. What you can do is send an email with a tracker to see if the receiver opened it.
http://www.aspnetemail.com/samples/emailtracker/default.aspx

Resources