Sending an email using javamail as if it were being sent from gmail - email

I'm developing a web application that uses javamail to send email messages and it works correctly.
The problem is that I don't get the email that I'm sending in the sent mail folder in the gmail account which I connect to, also I don't get bounced email as it happens if I try to send the email via gmail application.
I doubt this is due to security restrictions from javamail and cannot be done, as it would be much faster to get a possible spam list from an email server than doing it manually.but if it's for security reasons it would just be much better just not to bounce emails.
How can I use javamail as if sending the mails from gmail.com, getting the sent message in the sent mail folder and bounced mails in inbox folder?

The problem is that I don't get the email that I'm sending in the sent mail folder
Sending a mail via SMTP does not copy it to a sent folder automatically. Your sending application would have to make an IMAP connection after the SMTP connection and copy the message into the sent folder.
also I don't get bounced email
Make sure the Evelope Sender Address ("Return-Path") is set to the Gmail Adress you're using to send the messages.

Related

CakePhP mailer not sending mails to gmail (but sending Ok to outllook)

So the problem looks like my domain is being blacklisted by google, but when I check in spamhaus.org I see no issues with the domain. Also if I send mails using the webmail of my mail supplier I receive the mails ok. So the symptoms again are:
Server sending mails Ok to Outlook users but Gmail users are not receiving them
The mails are being sent with NO ERRORS from the server
When I send mails from the webservice of my supplier gmail users DO receive the mails
Any thoughts?

Verification email not received by domains using Office365 email client

When someone signs up they receive an email with a link they need to click to verify their email. The email comes from no_reply#domain.com
So far all clients receive this email with the exception of clients using their own domain with Office365. With these clients it's not an issue of emails going to spam - they don't receive anything at all in either their spam or their inbox.
The email is sent from a domain that uses Google Business for email.
Any ideas how to solve this issue?
I should add that if the email is forwarded manually, it does come through, just not when automatically sent.

Configuring POP3 with Sendgrid - Can't receive emails but can send them

All I have is an email client (emClient) and a working sendgrid account. When prompted to enter an email address, I can happily put anything#mydomain.com and it will confirm that it works with SMTP. I can also send emails using this client. I authenticate with the username apikey and my api key.
However, these emails are permanently stuck in the "outbox" and are constantly sent over and over again, presumably because the client has no confirmation that they were sent. When trying to set up a new account under this domain, I setup my "incoming server" as smtp.sendgrid.net and provide my credentials and it sort-of works (after prompting me for my authentication?).
As you can see, SMTP authenticates just fine and this makes sense as I am seemingly able to send email. However, both IMAP and POP3 when I select them in the "incoming server" are stuck on this "testing" stage until they fail.
Now, if we skip ahead to me sending something out - basically, it works. I receive the email on the destination, it does not get marked as spam and it comes from my domain and my name.
However, when I attempt to receive an email on the anything#mydomain.com one, it just doesn't do anything. I don't get an error from gmail that it wasn't delivered, it simply just doesn't get delivered.
For my domain settings, I have the following configured:
Twilio SendGrid developer evangelist here.
While SendGrid allows you to send emails over SMTP or via the API, SendGrid is not a full mailbox that you can connect to over POP3 or IMAP. You cannot connect to SendGrid using an email client, that is not what it is intended for. SendGrid is not a mailbox, but a way to programmatically send and receive emails and other email based events.
The way to receive incoming emails is via the inbound parse webhook. When you have set that up, incoming emails to your configured domain will cause a webhook, an HTTP request, to be sent to a URL you configured, with all the information about the email.

User cannot mail themself via Exchange

We currently experience the problem that a user cannot send a mail to herself.
She get the error that she's not allowed to send e-mails from this address.
(You are not allowed to send on behalf of this user...)
Her e-mail address is AAA#domain.com.
(From AAA#domain.com to AAA#domain.com)
She can:
Send e-mails internally
Send e-mails externally
Receive internal e-mails
Receive external e-mails
We make use of Office 2016 and Exchange 2010 14.03.0399.000
I found out that the local address book was corrupt.
Disabled addressbook, deleted the local file and enabled it again.
This solved the issue

php mail function & smtp approach not sending email from yahoo.com and some other domains

I am trying to send email from PHP using mail function to gmail ID, but email is not being delivered to the recipient if sender defined in header is yahoo ID, but if sender is hotmail then email comes fine. IF it goes sometime then it gets delivered at spam and the message on top of the message is 'This message may not have been sent by: xxx#xxx.com'
I have also tried phpmailer with smtp and ssl is also enabled on server, but no luck. Server is linux based hosted on godaddy
Thanks
This is because you can't send mail from a yahoo address unless you send it through a yahoo server - documented here. It will be bounced with a DMARC failure.