Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Email - CC

Avatar

Level 3

I currently using the following script to email a complete form

RealEmail.event__click.submit.target

= "mailto: Sandy.?????@??????.Com,Jerry.????@?????.com," + SalesPersonList.rawValue + "?subject=Manual Takeoff Bid Request - " + JobName.rawValue;

I would like the variable SalesPersonList.rawValue to go on the CC line....I've tried a few variations with no luck. I'm sure it's very simple.

Thanks,

-pc

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

The mailto follows a standard, that I looked up before, but can't remember where.

The cc format is "&cc", so I find that you need to have this at the end of the mailto string:

RealEmail.event__click.submit.target = "mailto:Sandy.Sherman@??????.com," + SalesPersonList.rawValue + "?subject=Manual Takeoff Bid Request - " + JobName.rawValue + "&cc=Jerry.Testa@?????.com";

Because I have copied and pasted your script (with Jive trouble), you may need to check syntax.

Good luck,

Niall

PS: I have some examples here: http://assure.ly/g9di4N.

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

The mailto follows a standard, that I looked up before, but can't remember where.

The cc format is "&cc", so I find that you need to have this at the end of the mailto string:

RealEmail.event__click.submit.target = "mailto:Sandy.Sherman@??????.com," + SalesPersonList.rawValue + "?subject=Manual Takeoff Bid Request - " + JobName.rawValue + "&cc=Jerry.Testa@?????.com";

Because I have copied and pasted your script (with Jive trouble), you may need to check syntax.

Good luck,

Niall

PS: I have some examples here: http://assure.ly/g9di4N.

Avatar

Level 3

Opps - A little premature on the correct answer....

I used what you supplied and it worked fine however I want to CC to the variable SalesPersonList.rawValue

So now it's looking like this below...It has to be close but I'm missing somthing

"mailto:Sandy.Sherman@?????.com,Jerry.Testa@?????.com"

+ "?subject=Manual Takeoff Bid Request - " + JobName.rawValue + &cc=SalesPersonList.rawValue;

-pc

Avatar

Level 10

Hi,

The cc needs to be in quotations, followed by the plus and object rawValue.

"mailto:Sandy.Sherman@?????.com,Jerry.Testa@?????.com" + "?subject=Manual Takeoff Bid Request - " + JobName.rawValue + "&cc=" + SalesPersonList.rawValue;

That should work.

Niall