Send email error using HTML

Hello.
I’m trying to send a reply email to the sender using the send email activity.

Please help me with the errors below:

  1. Using HTML to format the reply email content, can I insert the sender’s name, which I have extracted from the sender’s email?

  2. Can I append the sender’s original email using “+ mail.Body” at the end of the email content?

  3. “String constants must end with a double quote” -> how to resolve?
    Thanks.

Hi @Lum,
Read the Email content from text file,and pass the output(String variable) of email content in outlook activity as below.

image .

Are you keeping any dynamic variables in email content?

Yes.
Referring to my picture above, Dear [Name] will be dynamic and I would like to append the sender’s email below my reply email content, but not sure if I should use “+mail.Body”. Please advise.

1 Like

Hi @Lum,

Send me sample email content ,where you want to use its as dynamic variables.
If you are keeping the names in excel ot txt file,try this xaml.Email_Outlook.xaml (9.9 KB)

@Lum As @RajeshT Specified use a Text file to read that data then you can use +mail.Body+ to append it to that data.

As far as the reply is considered you can check on the reply format’s from your other mail’s and then you can structure the format according to it :smiley:

But it won’t be an actual reply.

2 Likes

Please refer to the sample email content attached.
Email format.docx (17.7 KB)

@supermanPunch @RajeshT
Please check the Email format.docx and advise. Thanks.

@Lum Can you also provide how the reply Mail should appear ? :sweat_smile:

Hi @Lum,

Try this solution.Sample Email.xaml (5.0 KB) Sample.txt (1.1 KB)
Sender email address you already have variable so in email body you just add as:
“Email bod”+senderemailadress.tostring

Hi @Lum,

You already solved the problem?

Hi @RajeshT, @supermanPunch,
I have managed to resolve the email with your help. Thanks so much.
Another issue I face is when I append the original sender’s email with “+mail.body”, the email content appears in a paragraph, different from the original email with break lines. How can I resolve this?

@Lum Can you maybe send a Screenshot of how the Body appears ?

The email content after ------ is the sender’s original email appended by “+mail.body”.

@Lum So the value of mail.Body is the whole Content after ----------- or is it a part of that content ?

Also Can you show How you would want the content after ----------- to appear ?

Based on that we can modify the mailBody value using String Manipulation and then put in a order you need.

@supermanPunch
This is how I would like the content after ----------------- to appear.

@Lum Is that the format that will be present always?
If so, can you send the mail body in a Text file. I will try to manipulate it to the form you need and make it generic.

The content is actually dynamic e.g. different senders name, email address and phone number, etc.

@Lum Yes, But the Keys will be the same throughout right ? LIke Enquiry Type, Full Name, Country Of Residence,… ?

Yes keys are the same. Please send me the text file so that I can test. Thanks.

@Lum Actually you should send the mail.Body value in a Text file, so that I can make the necessary String manipulation :sweat_smile: