0
votes

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?

1
Do you use gmail's SMTP server? Because if you do, sent mail should get added to your gmail account - see herefvu
I'm using this: Properties props = new Properties(); props.put("mail.smtp.host", smtp.gmail.com"); so I think I'm using ituser195321

1 Answers

0
votes

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.