Generate Email

Iceman_a

New Member
How would I generate and email and have webspeed sent it for say password reminder? This taking into account user enters email address.
 
Originally posted by Iceman_a
How would I generate and email and have webspeed sent it for say password reminder? This taking into account user enters email address.

I would recommend you to use the smtpmail.p program.
Here we use it both for Client/Server and Webserver
mailing.

Try embedding call to the smtpmail routine in your speedscript program, and voila!
It is possible to send attachment with the routine to,
so i recommend u to checkout the parameter
described in the header of the smtpmail.p program.

The smtpmail.p can be downloaded from the Possenet. http://www.possenet.org

Example program calling the Smtpmail program follows:

cMimeOptions = "type=text/html; Charset=iso-8859-1".

RUN SmtpMail.p("your.mailserver.com":u, /* settable SMTP server name/IP address */
cEmailAddress, /*TO: list of email addresses separated by semicolons or commas */
TRIM(F-FromName:SCREEN-VALUE), /* email address of user originating the email, the SMTP server should require that this user is real*/
"", /*CC list of email addresses separated by semicolons or commas */
"", /*Comma separated list of attachment descriptions Format looks like: file[:type=<mimetype>][:charset=<charset>][:filetype=<filetype>] */
"", /* comma separated list of filenames to the files described in Attachments. The filenames in this parameter must either be in the Progress path or have the entire path specified. In contrast to filenames in the Attachments are the filenames to show for the Attachments. */
cMailSubject, /*No explaination necessary*/
RedefinedBody, /* Actual text of the message can be whatever you want as long as you include the correct Header information in the MIMEHeader. If you are just sending plaintext you can leave the MIMEHeader blank, this is default setting If you wanted to send HTML you might use: type=text/html:charset=us-ascii:filetype=ascii */
cMimeOptions, /* [type=<mimetype>][:charset=<chrset>][:filetype=<type>] */
"Text", /* File/text. Determines whether a file or text goes into the message body. */
OUTPUT Mailsuccess,
OUTPUT MSG).

IF NOT Mailsuccess THEN DO:
/*Show the returned error-message from
the routine if anything has failed*/
MESSAGE MSG VIEW-AS ALERT-BOX.
END.


Good Luck.

Arnt Landsem (arnt@marketview.no)
Senior Consultant

MarketView AS
Leangenveien 7.
N-7044 Trondheim
Norway

(+47) 73 98 52 56 (Work)
(+47) 73 98 52 51 (Fax)
 
Back
Top