How to identify whether Google SMTP server has been blocked when used by an application to send emails - email

My web application sends email to users on certain business events. For this im using a Google SMTP server with both username password mode as well as OAuth 2.0.
Other props are as follows :
smtpHost: smtp.gmail.com
smtpPort: 587
Now the issue is, after some emails being marked as spams Google blocks the domain and the account. Is there a way to avoid happening this? And is there a way to identify the error thrown when tries to send the email when the domain is blocked, so I can create an alert about the domain and account being blocked.. For now its not possible to access the past logs either, but can get access to the new logs. Suggestions would be highly appreciated.

Related

Email succesfully sent but not appear in Sent Items (Microsoft 365)

Hi Good day to everyone here.
My first questions, here we go but i'll try to explain it the best way I could.
I develop auto sending email features using javaxmail in my application for my customer.
Previously when using setting smtp.office365.com I able to send email and the copies of sent email are display in Sent Items folder.
Recently when there are hiccup with smtp office (time out frequently), the IT department at my customer change the setting to use local server instead for smtp (with ip address 172.162.etc.etc). However since the start using this new setting, the email no longer appear in Sent Items but the email still able to sent out ( I test sending email to myself and able to received it ).
Since Im not really familiar and have very limited knowledge on server side for mail server, is there anything I can suggest to the IT department to check for? I only can login the email account on web (https://outlook.office.com/mail/) but when using outlook it required authentication. With web mail i already go thru all settings available and didn't see anything related.
Thanks in advance. Sorry if the question confusing and misleading.
Well, of course - your local SMTP server knows absolutely nothing about your remote Exchange mailbox. It cannot possibly place anything in your Sent Items folder.
You need to send using your Exchange Server - its SMTP server does place sent messages in the Sent Items folder owned by the authenticated user. Keep in mind that MS has recently disabled basic auth in M365. You need to re-enable it for your tenant and the particular mailbox used to send messages.

Mailbox unavailable. The server response was: This domain is not hosted here

I am performing some tests on my Nopcommerce site that should allow the user to type a message in to the contact box of the site and that message should be sent by email to a user.
When setting up and testing said user on the site, I am able to perform an email test against an internal email address and this works fine, I receive the email. However, if I try and send the email to an external email address, such as hotmail etc, I receive no error logs at all.
Has anyone ever come across this issue when trying to set up an email on a Nopcommerce site?
I am using port 25 however I have tried to use port 587 with no luck
The answer was that the username and password no longer existed for the server I was sending mail from. Moreover, another issue I had was that the mail still wasn't sending and was sitting in the Message queue. To overcome this I had to make sure that the bindings for the site on IIS were identical to the host values on the site. Doing this allowed me to send mail.

Sending email from GCE or AWS on behalf of users

How could I use Google Compute Engine (or a similar service, like AWS) to send email on behalf of users via their SMTP server?
I am interested in building an online email client which allows users to enter their SMTP and POP servers and send/receive email, like they would with their desktop clients. GCE blocks all SMTP ports to prevent abuse and recommends using a mail service like SendGrid instead. However, after researching dozens of these services, they all seem to only support transactional email using their own SMTP servers, or possibly a pre-cleared smtp server. I simply want to send email using the user's SMTP server (ex smtp.mail.yahoo.com), just like they would if they were using a desktop client.
I realize I could host my own servers but I am not interested in maintaining the infrastructure. I would like to host everything on a cloud service. Is there any way I can work around Google's restrictions with an existing service?
As I'm sure you are aware, you would have to have the user enter their SMTP server information and account credentials. You would then use that information to connect to their SMTP server.
By default AWS EC2 instances have SMTP traffic on port 25 rate limited. To remove this limitation, you would need to fill out and submit the following form:
https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
If you're looking to send mail as a Gmail, Hotmail, or Yahoo user, you'll probably want to call the service's API to have the server send mail on the user's behalf. There are several benefits of this:
You'll need to get authorization from users (usually via an OAuth flow)
in order to access their mail. This means that users shouldn't be
surprised that you're sending mail from their accounts, and they'll
have some control over your access.
The mail will be signed and come from the appropriate IP addresses to
comply with the various spam-control mechanisms set up by those
companies. Without this, it's likely that the mail you send will end
up in the bit-bucket of the recipient.
By using the API, the service should be able to keep a copy of the
sent mail in the user's outgoing mail folder. This will let the user
see and search for the original message sent if they want.
Unfortunately, this may also mean that each mail service you want to send from will need separate integration, and that you may not be able to send as the user's email address from smaller providers.
Note that the App Engine mail API allows you to send mail as the currently logged-in user (when logging in, users have a similar consent screen to the OAuth process mentioned above).

How to send Email to every host in scala play framework?

Right now, i am able to send my email to current host where i have declared in the scala code application.conf
smtp.host=apps.hubino.com, smtp.port=25
but i am unable to send my mail to other host like gmail and yahoo. Can anyone help me how to achieve sending mails to every host in scala.
I am sending email through google smtp server with these configuration.
smtp.host=smtp.gmail.com
smtp.port=465
smtp.ssl=yes
smtp.user=“********#gmail.com"
smtp.password=“**********"
This should work. Also if you make small changes in host and port you should be able to send email to any other smtp servers.
Which scala plugin you are using to send email? You can check MailerPlugin of Play or Courier plugin. Both are very simple to use.
And first time google will block sending email through you application as it is less secured so you need to make changes in your gmail account settings to allow sending email through less secure clients. This link can help you do that or else if you try to send email without making these setting you will received email from google saying securing 'Blocked sign-in attempt' which will contain URL to make changes in your account setting to allow sending email through api client.

Send email from server without SMTP enabled

I have written a couple of web sites that contain a "contact us" form.
However, our host recently switched SMTP off. Their excuse is "security issues".
The solution they offer is that they implemented rules whereby all mail generated from the platforms must be sent using the sendmail/phpmail functions and pass through a mail relay which checks the mails and their content and ensures malicious content and activity is completely blocked and they recommend I use "A virtual or dedicated solution".
I have no idea what it is they want me to do to get emailing working again and this is quite urgent as many clients are not getting their emails.
Is there an easy way to go around this in order to get emailing working again?
Many thanks in advance
It generally means that you will have to specify the new mail server they are providing instead of localhost in your code. Further, earlier, you were able to send the mail without authenticating but now on, you must have an account and you must authenticate before you send the mail. (I am not sure though, may be they allow relay to their own servers and you might not need authentication).
Go to the control panel of your hosting account and check for the mail panel. Check out the new smtp server name there and code your site to use this smtp server with credentials. This will let you send mail again.