Hi
I have couple of problems when using "mailto" to send emails.
1. If i execute the following code, it pops me an alert message in browser stating that "This form is submitted using e-mail. Submitting this form will etc etc. "
Is their any way i can get rid of this alert box.
2. Here I have formatted text text message using '\n' for new line characters. It shows new lines properly formatted in alert but when i recieve message their is no new line or any formating.
3. When i try to send bcc mails using something like
var act="mailto:?bcc" + toaddrs + "Subject=" + Sub + "&Body=" + msgbody;
Then it just does not send any mails.
Javascript Email Messages to group of users
<HTML>
<head>
<script language=javascript>
function AddData(){
var toaddrs;
var ccadrs;
var Sub;
var msgbody;
toaddrs='yajmi@abc.com';
ccaddrs="treng@abc.com"
Sub="CONGRATULATIONS!!!";
msgbody="Congratulations! \n You have qualified for the Honor Ring award. \n Please go to the URL below and register the information requested. \n"
msgbody=msgbody+"\n\n for all of your hard work, and enjoy your award.\n\nThanks,\n\nThe Support Team"
var act="mailto:"+toaddrs+"?Subject="+Sub+"&Body="+msgbody;
//alert(act);
document.forms[0].action=act;
//alert(document.forms[0].action);
document.forms[0].submit();
//<A href="mailto:?bcc=yajmi@abc.com">
}
</script>
</head>
<body MS_POSITIONING="GridLayout" onload="AddData()">
<form id="Submit" method="post" runat="server"
action="mailto:yajmi@allstate.com?Subject=New Subject&Body=This is the
message body">
<!-- <INPUT type="button" NAME="a" onclick="AddData()">-->
<INPUT type="hidden" NAME="aaa">
<!-- <INPUT type="submit" value="Submit">-->
</form>
</body>
</HTML>
I have couple of problems when using "mailto" to send emails.
1. If i execute the following code, it pops me an alert message in browser stating that "This form is submitted using e-mail. Submitting this form will etc etc. "
Is their any way i can get rid of this alert box.
2. Here I have formatted text text message using '\n' for new line characters. It shows new lines properly formatted in alert but when i recieve message their is no new line or any formating.
3. When i try to send bcc mails using something like
var act="mailto:?bcc" + toaddrs + "Subject=" + Sub + "&Body=" + msgbody;
Then it just does not send any mails.
Javascript Email Messages to group of users
<HTML>
<head>
<script language=javascript>
function AddData(){
var toaddrs;
var ccadrs;
var Sub;
var msgbody;
toaddrs='yajmi@abc.com';
ccaddrs="treng@abc.com"
Sub="CONGRATULATIONS!!!";
msgbody="Congratulations! \n You have qualified for the Honor Ring award. \n Please go to the URL below and register the information requested. \n"
msgbody=msgbody+"\n\n for all of your hard work, and enjoy your award.\n\nThanks,\n\nThe Support Team"
var act="mailto:"+toaddrs+"?Subject="+Sub+"&Body="+msgbody;
//alert(act);
document.forms[0].action=act;
//alert(document.forms[0].action);
document.forms[0].submit();
//<A href="mailto:?bcc=yajmi@abc.com">
}
</script>
</head>
<body MS_POSITIONING="GridLayout" onload="AddData()">
<form id="Submit" method="post" runat="server"
action="mailto:yajmi@allstate.com?Subject=New Subject&Body=This is the
message body">
<!-- <INPUT type="button" NAME="a" onclick="AddData()">-->
<INPUT type="hidden" NAME="aaa">
<!-- <INPUT type="submit" value="Submit">-->
</form>
</body>
</HTML>