Hello,
I have been searching for some time to try and find a way (that works) to add email(s) to the CC: line of the email message. I have the following script:
<
event activity="click" name="event__click">
<
script contentType="application/x-javascript">if (Comments.rawValue != null){
RealEmail.event__click.submit.target = "mailto:" + "someone@somewhere.com" + "?cc=" + "someone@somewhere.com" + "?subject=" + "Some subject";
RealEmail.execEvent("click");
} else {
app.alert("Please add comments!");
}
</
script>
</
event>
Which returns the subject line in the CC line along with the email address listed for the CC line.
Does anyone know how to add both the cc and subject to a event__click?
Thanks in advance for any solutions!
Chad
Solved! Go to Solution.
Views
Replies
Total Likes
The first parameter must be preceded by a ? and all otehrs by a & ...so it will look like this:
= "mailto:" + DropDownList1.rawValue +"?cc=" + fieldname.rawValue + "&subject=" + Subject.rawValue
Paul
Views
Replies
Total Likes
You can use this language in the Submit to URL field on the Submit tab:
mailto:emailladdress@domaon.com,emailladdress2@domain.com?subject=This is a subject&body=This is the body&cc=emailaddress@domain.com&bcc=emailaddress@domain.com
You need the separating ?'s and &'s for it to work.
Views
Replies
Total Likes
This would work if I was using the same email each time, but I am referencing x.rawValue for a few of the email addresses that is collected in the form. I tried to implement the code in the event__click and it didn't work that way.
Thanks for the reply, but I still need help getting it to work with my current requirements.
Views
Replies
Total Likes
The property of the submit button is:
RealEmailButton.event__click.submit.target
= "mailto:" + DropDownList1.rawValue + "?subject=" + Subject.rawValue;
You wont be bale to put code on that button so I would hide the real button, then put a fake regular button on the dform. You can script on that one. On the click event adjust the submit.target code to the values that you want. Then use the command:
RealEmailButton.execEvent("click")
to cause the real submit button to click and execute.
Make sense?
Paul
Thanks for the response Paul, but using the information you provided works up until I try to add the email to the CC field.
How would I go about adding CC to the = "mailto:" + DropDownList1.rawValue + "?subject=" + Subject.rawValue; string?
I tried + "?cc=" and + "&cc=" but neither of them work.
Views
Replies
Total Likes
Same issue and question as above.
Views
Replies
Total Likes
The first parameter must be preceded by a ? and all otehrs by a & ...so it will look like this:
= "mailto:" + DropDownList1.rawValue +"?cc=" + fieldname.rawValue + "&subject=" + Subject.rawValue
Paul
Views
Replies
Total Likes
Post your form and I will have a look
Paul
Views
Replies
Total Likes
The top of page two is where I used the drop down menu with the fake email button method you detailed in another post. It creates the email with the attachment and puts the correct email To fine, but I can't get the Cc address part to work.
I tried your code above, but when the email is created it puts the same email from the To also in the Cc. Take a look. I'm using Novell GroupWise rather than Outlook. I'm assuming that may have something to do with it.
Views
Replies
Total Likes
Hi Paul,
I have attached the form for your reference. FYI...the submit buttons work on my PC (minus the cc problem I was originally trying to figure out) which has LiveCycle installed on it. When I tried the form from another machine, neither of the submit buttons worked, ARGH!!!
Please take a look at both buttons that are supposed to submit and see if you can figure it out for me.
Thanks for your assistance.
Views
Replies
Total Likes
OK, I have the submit issue fixed, but I am still having problems with the CC option. Any assistance is appreciated getting that field to populate...
Views
Replies
Total Likes
After a quick look the CC must be in lowercase for the mailto to work.
I will have a closer look later today.
Paul
Views
Replies
Total Likes
Hello,
I finally figured it out...using the following script.
<event activity="click" name="event__click">
<script contentType="application/x-javascript">if (UpdateOrDuplicate.rawValue != null){
RealEmail.event__click.submit.target = "mailto:" + EmailField.rawValue + "?cc=" + "someone@somewhere.com" + "&subject= " + SomeField.rawValue + " Any text you want in your subject " + AnyOtherValue.rawValue;
RealEmail.execEvent("click");
} else {
app.alert("Please select from the dropdown box!");
}
</script>
</event>
Thanks everyone for their feedback!
Views
Replies
Total Likes
drizagon - Can you take a look at my attached form above and see if you can get it to work? I tried copying your script but I still can't get it to work. I keep getting the same address I chose using the dropdown to fill up both the "To" and CC". I would be very grateful if you can take a minute to look at it for me. Thanks
Views
Replies
Total Likes
You almost had it acmurdah, you just needed a lower case cc and s for subject. I have attached the working form for you. Enjoy!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies