Question
WELLS FARGO
IN
Last activity: 7 Jul 2017 7:42 EDT
.eml for out bound emails
In email listener, we have an option to save original mail which creates a Original-email.eml file which is a wrapper of incoming mail. We have a requirement where we have to create .eml file for outbound email scenario. Is there any possible out of box way through which we can create this .eml file for outbount email file? Any function or activity for this purpose?
***Updated by moderator: Lochan to update Categories***
-
Likes (1)
Piyush Tiwari -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Virtusa IT Consulting
AE
While saving the email attachment you could set the pyFileName with .eml extension.
WELLS FARGO
IN
Changing the extension will save only the email body, but additionally the email parameters like to, from , cc, email body including attachments of the email needed to be wrapped into the .eml. Need the functionality of the check box name Save Original email which is provided in email listener process tab.
WELLS FARGO
IN
Hi baigh, saving the attachment will not change the format of the content.
Carelon Global Solutions India LLP
IN
Hi Karthik,
Please go through the below link and let me know if it could be helpful.
https://community.pega.com/support/support-articles/incoming-email-incorrectly-read
Thanks,
Praveen Kumar Sethia.
WELLS FARGO
IN
Hi Praveen,
The shared article talks regarding the email format, the requirement is to have the utility to create the outbound email and its all attachments into an eml which includes all the information of the email like To, from ,cc , bcc, email body and attachments. (Which is available for inbound email in the listener which is configured as save as original email checkbox). We currently have to construct the same as pega email listener(inbound) is working for outbound.
Carelon Global Solutions India LLP
IN
Hi Karthik,
For your requirement, I assume that you are sending an Outbound email using some smart shape like send mail or some utility like sendsimpleemail. If you are doing so, then you need to handle explicitly by following the steps:
1. Find out the activity which actually formulates the mail e.g., SendEmailNotification for SendSimpleEmail and capture the required values like To, CC,BCC,body etc.
2. Use some java code for creating an eml file and place it under the desired path as follows:
Hi Karthik,
For your requirement, I assume that you are sending an Outbound email using some smart shape like send mail or some utility like sendsimpleemail. If you are doing so, then you need to handle explicitly by following the steps:
1. Find out the activity which actually formulates the mail e.g., SendEmailNotification for SendSimpleEmail and capture the required values like To, CC,BCC,body etc.
2. Use some java code for creating an eml file and place it under the desired path as follows:
Message message = new MimeMessage(Session.getInstance(System.getProperties()));
message.setFrom(new InternetAddress(from));
message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to));
message.setSubject(subject);
// create the message part
MimeBodyPart content = new MimeBodyPart();
// fill message
content.setText(body);
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(content);
// add attachments
for(File file : attachments) {
MimeBodyPart attachment = new MimeBodyPart();
DataSource source = new FileDataSource(file);
attachment.setDataHandler(new DataHandler(source));
attachment.setFileName(file.getName());
multipart.addBodyPart(attachment);
}
// integration
message.setContent(multipart);
// store file
message.writeTo(new FileOutputStream(new File("c:/mail.eml")));
Thanks,
Praveen.
Synechron Inc
US
Hi Karthik,
I have a similar requirement for my project. I need to attach the incoming eml file with some modifications to the subject line. Were you able to figure this out?
Thanks,
Anumohan
Pegasystems Inc.
IN
Hello!
Thank you for posting your query on PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
We have also sent you a private message opening up a communication channel in case you have any further questions.
Thanks!