Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Send Email with HTML dialog text field edit box lines
First, create the dialog using HTML. Save the following code as "email.html"
<html>
<body>
<html>
<head>
<title>email</title>
</head>
<body>
<form name="form1" method="post" >
<BR><TABLE cellspacing=0 cellpadding=8 bgcolor="blue">
<TR><TD align=left>
Mailserver: <INPUT type="text" name="Mailserver" size=45><BR>
</TD></TR>
<TR><TD align=left>
UserName: <INPUT type="text" size=45 name="UserName"><BR>
</TD></TR>
<TR><TD align=left>
Password: <INPUT type="password" size=45 name="Password"><BR>
</TD></TR>
<TR><TD align=left>
Email From: <INPUT type="text" name="sender" size=45><BR>
</TD></TR>
<TR><TD align=left>
Email to: <INPUT type="text" size=45 name="emailto"><BR>
</TD></TR>
<TR><TD align=left>
Subject: <INPUT type="text" size=45 name="subject"><BR>
</TD></TR>
<TR><TD align=left>
<TR><TD align=center>Text Message:<BR>
<TEXTAREA wrap=virtual rows=5 cols=50 name="emailtext"></TEXTAREA></TD></TR></TABLE><BR>
<INPUT type="submit" name="submit" value="Send">
</FORM>
</CENTER>
</BODY>
</HTML>
Then, create the winbatch script using HTML Dialog extender and the Postie extender.
Save the following code as "email.WBT"
AddExtender("WWHTM34I.DLL") path=FileLocate("c:\windows\desktop\email.html") WinTitle("","Emailer") hBrowseSetPos(200,100,800,900) hBrowse(2,path,2) mailhost=hGetVarValue("Mailserver"," ") Userid=hGetVarValue("Username"," ") password=hGetVarValue("password"," ") sender=hGetVarValue("sender"," ") tolist=hGetVarValue("emailto"," ") subject=hGetVarValue("subject"," ") body=hGetVarValue("emailtext"," ") hBrowse(0,path,0) ;USED FOR DEBUGGING ;Message("Your Mailserver", mailhost) ;Message("Your username", userid) ;Message("Your password", password) ;Message("Your email", sender) ;Message("Send Email to",tolist) ;Message("Your Subject",subject) ;Message("Your Message body",body) AddExtender("WWPST34I.DLL") attachments="" flags="h" kInit(mailhost,sender,userid,password,'') kDest(tolist,'','') kSendText(subject,body,attachments,flags) Exit
Save the files(.HTML and .WBT) to the same directory. Then Run the email.wbt file....
Article ID: W14452
Filename: Send Email with dialog.txt
File Created: 2001:03:01:14:56:48
Last Updated: 2001:03:01:14:56:48