Image ATTACHMENT content.
The Steps are listed below
- Create
EmailAttachmentandMultiPartEmailinstance. - Set the host name of the server
smtp.googlemail.com - Set email account details .
- Set email address for To and From.
- Set Email subject and attachment of the Email.
- Finally sending mail
SourceFile:
TextEmailAttachment.java
Output:
Email sent successfully
Download:Sending email attachment using Gmail with text content
test
ReplyDelete