|
-
Aug 13th, 2000, 01:06 PM
#1
Thread Starter
Lively Member
ok i'm relatively new to javascript, but i'm pretty good. one thing i've been trying to do with javascript is to send an e-mail message using javascript's Sendmail() object. However, nothing ever happens when i use it. if anyone knows how to do this, please help me.
-
Aug 18th, 2000, 09:45 PM
#2
Fanatic Member
First off, This is core javascript. It is only supported server side and to the best of my knowledge is only supported in a Netscape's Server-Side Addition. Here is a simple example of what the code looks like:
Code:
<server>
//See what's happening
if(request.method == "POST"){
//create a new mail object
var tMail = new SendMail();
//assign some values
tMail.To = request.To;
tMail.From = request.From;
tMail.Subject = request.Subject;
tMail.Body = request.Message;
tMail.Smtpserver = "mail.yourserver.com";
//Try to send
if(!myMail.send()){
alert(tMail.errorCode() + ": " + tMail.errorMessage());
}
else{
alert("Mail Sent.");
}
}
</server>
<form name="MailForm" Method=POST>
To: <input type="text" name="To"><br>
From: <input type="text" name="From"><br>
Subject: <input type="text" name="Subject"><br>
Message: <TextArea name="Message" cols=50 rows=15><br>
<input type="submit" value="Send"><input type="reset" value="Clear">
</form>
Hope this helps.
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|