Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Send email to me and user

Avatar

Level 2

Ok simply I want 1 text field labeled "Your email address". I also want 1 button that says "Send mail".

I want the user to be able to send me the PDF form and also send the copy to his email previously seen in 1 text field.

I also dont want to use local mail clients. Just want to upload the PDF to my server so the user comes, inputs and fires of the mail from there.

Im using Livecycle ES2.

Please help.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Ok,

1. Create a button and select it

2. Open the script editor (on top of the design view) (ctrl + shift + F5)

3. Select the click event and make sure the language is set to "JavaScript".

4. Paste the script above

MailTo.png

View solution in original post

30 Replies

Avatar

Level 10

I don't see any relationship between the script and your mailing problem.

The script simply copies the string you enter in the text field and uses it as cTo property.

Avatar

Level 2

yea me neither it always seems to add capital S before the mail.  thanks anyway you've been really helpfull.

Avatar

Level 2

Just a possible hint of solution if you can help.

I think it is adding that capital S in front cause in that code it says cTo: 'darioyebote@gmail.com', and i found this on this url http://support.google.com/mail/bin/answer.py?hl=en&answer=6596

'This Gmail user does not exist...'

This error usually occurs when there are typos in the recipient's email address. Some common errors include the following:

So i dunno if you could code around to somehow encapsulate my email in something else that quotation marks.

Thanks

Avatar

Level 10

You can use a small JavaScript in the exit event of the text field which uses a regular expression to check the entered address.

if (!this.rawValue.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/g)) {

          xfa.host.messageBox("Invalid E-mail address!");

}

Avatar

Level 2

Hm okay it seems its invalid i just dont know how its possible. I mean its my adress and it for 2000% doesnt have a capital S in front of it. so you're using the script and it works yes no S's anywhere?

Avatar

Level 10

No S's at all. I have really no idea where it comes from at your end.

Maybe you mail app refers auto-poplulates the address with another one which is invalid.

What if you use another address? Any additional S there?

Avatar

Level 2

Yea same. Yahoo, Gmail, Hotmail what have you. I dunno theres no logic behind this.

Avatar

Level 10

Try it on another system if possible.

I believe this is related  to your current mail app.

Avatar

Level 2

And that plugin you've made you're using it on ES3 or something else?

Avatar

Level 10

Yes, I use it in ES3, but it will also work with ES2.

All you need is FlashPlayer.

Here are some basic information about.

http://blogs.adobe.com/formfeed/2010/01/designer_es2_macros.html