Gmail SMTP Authentication Error when using App password with workspace domain alias - email

I want to be able to use my Google Workspace email alias when automating email sending using yagmail and gmail's SMTP server.
I have set the default "Send Email As" address from the main email (#gmail.com) to the alias email (#domain.com), which is fine when sending manually. I currently have 2SV enabled with my main email & app password sending emails properly through yagmail, but it still shows the sending address as the main email. I tried authenticating with the email alias and a new app password, but I am receiving the following error:
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted).
I tried a few solutions found online, such as this one (https://support.google.com/mail/thread/127655543/gmail-alias-not-working-it-says-the-password-i-am-entering-for-the-alias-is-wrong-but-it-s-correct?hl=en), to no avail.
Why is using App password fine for my main email but not my domain alias? How can I automate sending emails using domain alias? Any help on this would be greatly appreciated!

Related

Emails not received in Opencart-3 from the same adress (from admin to admin email)

Please Help ...
I debug it and everything looks fine, I configured the SMTP in admin successfully and emails working fine but in case, If we add the same Hosting Domain name, while sending email then It's not working ???
Example: Forgot password not working because URL there but In admin "Marketing => Mail" working, If I do not add domain name. (NOTE: Other domain name working, If I add only opencart3 hosted domain name not working in email)
It looks like not an OpenCart issue, but a hosting configuration. As you said, when you are using same domain name in email, as a site domain - sometimes it's a routing incorrect.
Check an email configuration on your server. When you trying to sent an email to same-domain address - it could be routed as an inner massage. For example, in cPanel hosting settings you should inspect "Mail forwarding" and can check the status of messages in "Track delivery".
If you are using cPanel - go to Mail forwarding, find you domain, and change settins:
Automatically Detect Configuration. - will be set by default.
Local Mail Exchanger. - try this.
Backup Mail Exchanger.
Remote Mail Exchanger. - or this.
Or you can ask you hosting support. Your question will be "I'm trying to use an email address mayaddress#mydomain.com via SMTP on my mydomain.com, but when i try to sent an email to the same address - the message is missing. Can you check email routing settings?"

moodle email configuration error

I have been trying to configure SMTP in order to send an confirmation email to email based self-registration users but each time an error message appear saying that
Tried to send you an email but failed!
this is my moodle email configurations
this is the error message I get when I run a test email
when searched the error I found that Moodle does not connect to email server.
is there any other configurations that I should check?
since this did not work I tried to connect through outlook.
I tried to configure outlook but it also failed.
this is the configuration for outlook
this is the error I get
please help..!!!
I'm not entirely sure what the problem is, we are using our own mailserver..
However, there are some restrictions to Gmail usage, which can require you to make some changes on your Gmail account.
Have a look at this to allow a new service access to your Gmail account:
https://www.lifewire.com/unlock-gmail-for-a-new-email-program-or-service-1171974
And here to allow your Gmail access to less secure services and programs:
https://myaccount.google.com/lesssecureapps?pli=1

How can I use a user alias with gmail smtp authentification?

I am using Drupal 7 and the SMTP module. The Gmail (Apps for work) account uses 2 step verification and an app password so that the website can auth using SMTP. Fine so far.
The problem is that the user account, say johndoe#domain.com should not be the from address, but info#domain.com should. info is already a working alias for johndoe.
We must use johndoe to actually authenticate, an alias does not work for this. But, although the from address in debug is info#domain.com, in my mail app the sender still seems to be johndoe#domain.com.
Any ideas?
Edit: I've read that the Google SMTP service overrides the from address with the user account. Even if the from address is an existing alias?
This is really weird.
Please try adding alias email address in gmail.
Open gmail => Setting => Accounts => Send email as: => Add another email address
Gmail will send confirmation code to the alias email. After you add the alias address, gmail smtp will accept "from" parameter with your alias address.
if I understood you, if you want to use the account (johndoe#domain.com) to authenticate, but you do not want it to be shown as a sender, and the sender should be (info#domain.com), then you must follow the following Steps.
It is more than obvious that you must be a GSuite administrator.
First you enable third-party authentication, go to:
Google GSuite Security=>
basic configuration=>
Unsecured applications=>
(click here) Access the settings of unsafe applications=>
Enable access for all users to unsafe applications (not recommended)
Second, in your application for sending mail do this:
Sender Address: info#domain.com
User: johndoe#domain.com
Server: smtp.gmail.com
Port: 465
Encryption: ssl
Password: yourpassowrdaccount
Exampple: https://i.stack.imgur.com/u0X8J.png

Sending email CPanel

the problem is this:
I need to send an email to a Google Apps account with the same domain that I have delegated to our server from CPanel.
The problem is that when I send an email from no-reply#mydomain.ie (email server) to support#mydomain.ie (gapps email) [same domain, different servers] not from the server, but it tries to find "support" on the local server and can not find (No Such User Here).
Is there any way from CPanel, so that if the user does not find email (support), send it the same? Considering that to send email no-reply#mydomain.ie have the account and use local data.
Thanks!
Alejandro.
I believe you are using Google Apps for email service. It seems that your mail exchanger is set to local in your cPanel.
Go to WHM -> Edit MX and edit this domain. Here you will get an option to set remote mail exchanger for your domain.

Jenkins throws "Client does not have permissions to send as this sender"

There is lots of posts with users having same error, but none of them works for me...
I am trying to send email reports in Hudson/Jenkins...
Our mail server uses SSL/TLS, I configured Jenkins for TLS, then I am getting this error:
Client does not have permissions to send as this sender
When I try javamail using code, it sends the email properly. Also, Thunderbird works fine.
Any ideas? Do I need to contact mail server administrators?
Finally got it, thanks to Friso
Had to set my email address in System Admin e-mail address under Jenkins Location.
The email should be changed in three places as below as per version 2.19.4:
Extended E-mail Notification - If using SMTP plugin
Email Notification - SMTP Authentication
Jenkins location - System Admin e-mail address
I had the same issue, and I discovered that credentials were no more valid, so I asked to the IT department who told me that credentials were no more need on LAN.
Now it works!