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 Button without attachment

Avatar

Level 2

I am hoping to send an email from a pdf that sends the link for where the pdf form is on the local drive rather than the physical copy of the pdf form.

I have figured out how to place the link of the location of the file into the body, but I can't figure out how to disable the file attachment part of the submit button.

Is there anyway to disable the attachment when you use the submit command? I have tried playing with EmailButton.resolveNode("$..#submit").format but can't change it to nothing. And if the submit button my submit something is there any other way to send an email without using the submit command?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 2

I figured it out after searching for mailDoc.

Using app.mailMsg does the trick

useful post: http://forums.adobe.com/message/2307841

Thanks!

View solution in original post

4 Replies

Avatar

Level 10

You can do it by scripting your own submit button.

So use a regular button and put the following on the click event of the button. The operators can point to field rawValues instead of hard coding the values (cTo, cCC, cSubject, cMsg).

var oDoc = event.target;

oDoc.mailDoc({

bUI: true,

cTo: "someone@example.com",

cCC: "someone.else@example.com",

cSubject: "This is my email subject",

cMsg: "This is my email message"

});

Avatar

Level 2

I tried this example in a blank form on a regular button, and it attaches a pdf still.

Is there some other setting or something I need to do?

Avatar

Correct answer by
Level 2

I figured it out after searching for mailDoc.

Using app.mailMsg does the trick

useful post: http://forums.adobe.com/message/2307841

Thanks!

Avatar

Level 10

Hmm...odd, pretty sure I used that code before for no attachment but didn't test before posting.

Glad you got it sorted.