srikotesh
asked on
How do i send mail with attachment and mail body will have some data
HiExperts,
How do i send mail with attachment and mail body will have some data
question1
answer1
question2
answer2
feedback_comments
created_on
along with these fields one attachment(with some text content) i need to send.
How do i send mail with attachment and mail body will have some data
question1
answer1
question2
answer2
feedback_comments
created_on
along with these fields one attachment(with some text content) i need to send.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi CEHJ,
When i am trying with the above link i am getting authentication failed.
javax.mail.AuthenticationF ailedExcep tion: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbtk
When i am trying with the above link i am getting authentication failed.
javax.mail.AuthenticationF
I just tested it. Worked fine (of course after i'd put the correct addresses and username/password in)
Update: just changed (and tested) the code at that link so it's easier to use
ASKER
still authentication failed.
this link helps me out of authentication failed.
http://stackoverflow.com/questions/25341198/javax-mail-authenticationfailedexception-is-thrown-while-sending-email-in-java
Now i am able to send mail successfully.
this link helps me out of authentication failed.
http://stackoverflow.com/questions/25341198/javax-mail-authenticationfailedexception-is-thrown-while-sending-email-in-java
Now i am able to send mail successfully.
ASKER
Hi CEHJ,
Thanks for your suggested link.
Now coming to my requirement.
For each user request
i have to create a file and insert question , answers and feedback comments into that file.
can you help me on this..
Thanks for your suggested link.
Now coming to my requirement.
For each user request
i have to create a file and insert question , answers and feedback comments into that file.
can you help me on this..
For each user requestIs it the same file for each user or is each different?
i have to create a file and insert question , answers and feedback comments into that file.
ASKER
no file name should be unique.it should not be a duplicate
ASKER
Hi Cehj,
This is the sample template i have to send it in attachment.
please find the attachment.
template.PNG
This is the sample template i have to send it in attachment.
please find the attachment.
template.PNG
Looks like the kind of thing that would be more apt to do with a web form than an email.
Also looks like it needs quite a bit of proof-reading/editing ;)
Also looks like it needs quite a bit of proof-reading/editing ;)
ASKER
Hi cehj,
that is a sample template.we no need to send exactly the same.the best possible way how we can send this attachment using java.
that is a sample template.we no need to send exactly the same.the best possible way how we can send this attachment using java.
These are two separate issues:
a. populate a template with data to produce a mail file
b. attach a mail file to an email and send it
You posted a question about b. and i believe i've answered it
a. populate a template with data to produce a mail file
b. attach a mail file to an email and send it
You posted a question about b. and i believe i've answered it
ASKER
k
ASKER
I will raise one more question for this
:)
ASKER