These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Button script to add from: username

dm03022
Registered: Jan 10 2008
Posts: 10

I am looking for assistance on script to add another username as the sender of the email for a submit button.

My Product Information:
LiveCycle Designer, Windows
madhu_livecycle
Registered: Jun 23 2009
Posts: 13
Hi dm03022,

u can use the below script for a submit button in click event,


var lEmail='test [at] gmail [dot] com;test1 [at] yahoo [dot] com';
var myDoc = event.target;
try {
myDoc.mailDoc({
bUI: false,
cTo: lEmail,
cCC: "",
cSubject: "Subject",
cMsg: "..."
});
} catch (e) {}

u can add the sender id's to the lEmail variable with a semicolon as separator.

Thanks,
Madhu.
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
The parameter cTo describes the receivers, not the sender.

From the JS API manual
Quote:
"cTo (optional) The semicolon-delimited list of recipients for the message."
You can't manipulate the sender adress. That will be non-serious!

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

cvanmech
Registered: Jan 9 2009
Posts: 17
Question,

Can't a "NoReply@domain" mailbox be used?

I'm facing a similar problem, I want to sent a email but the person who receives the mail may not be able to Reply on that mail?