Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #5956
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Sending email with default prog |
| Date | 2011-01-28 08:48 -0600 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ihukv7$1ho$1@speranza.aioe.org> (permalink) |
| References | <d31243b7-b894-4b8c-859a-05197ace22e8@o39g2000prb.googlegroups.com> <652de863-b9c0-4306-a88f-6198e69b63af@l18g2000yqm.googlegroups.com> <3a9aff70-fbf6-475c-8bfd-72abdde7b255@m13g2000yqb.googlegroups.com> <dafb2235-0d5e-4a4b-9883-f0da734c93f7@o7g2000prn.googlegroups.com> |
Gregory,
The attached code is a slightly modified version of Stephan's code. I have
tested this against VO 2.8 sp3.
Regards,
Willie
FUNCTION Start()
LOCAL cReturn AS STRING
? cReturn := SMTPSendMail("mail.mannersinmotion.com", ; // My ISP's
server,
"Test to send email", ;
// Subject
"herding@mannersinmotion.com", ;
// To:
"", ;
// CC:
"This is a test for body", ;
// Body
"williem@mannersinmotion.com", ; //
From:
"c:\world.ico", ;
// Attached file
"Willie Moore", ;
// My name
"", ;
// BCC:
"", ;
// Cargo
"YourLogonInfoGoesHere", ;
// User name when you need to log IN
"YourPwdGoesHere", ;
// Password when you need to logIN
TRUE, ;
// Log in YES/NO
TRUE, ;
// Log in to a secure server . If you login on most servers this needs to be
true
75;
// port. pass in 0 to use the default SMTP port
)
WAIT
RETURN NIL
FUNCTION SMTPSendMail (cServer AS STRING,;
cMailSubject AS STRING,;
xDestUser AS USUAL,;
xCCUser AS USUAL,;
cBody AS STRING,;
cFromAddress AS STRING,;
xAttachFile AS USUAL,;
cFromName AS STRING,;
xBCCUser AS USUAL,;
cCargo AS STRING,;
cUsername AS STRING,;
cPassword AS STRING,;
lLogin AS LOGIC,;
lSecure AS LOGIC,;
nPort AS LONG) AS STRING PASCAL
LOCAL cRet AS STRING
LOCAL oSmtp AS CSMTP
LOCAL oEmail AS CEmail
LOCAL cServerIP := GetIPAddress(cServer) AS STRING
oEmail := CEmail{}
oEmail:FromAddress := cFromAddress
oEmail:FromName := cFromName
oEmail:Cargo := cCargo
oEmail:Subject := cMailSubject
oEmail:DestList := xDestUser
oEmail:CCList := xCCUser
oEmail:BCCList := xBCCUser
oEmail:MailBody := cBody
IF !IsNil(xAttachFile)
oEmail:AttachmentFileList := xAttachFile
ENDIF
oSmtp := CSMTP{oEmail}
oSmtp:RemoteHost := cServerIP
oSmtp:TimeOut := 5000
IF nPort > 0
oSmtp:RemotePort := nPort
ENDIF
IF lSecure
oSmtp:SecureSMTP := TRUE
ENDIF
IF lLogin
oSmtp:Username := cUsername
oSmtp:Password := cPassword
ENDIF
IF oSmtp:SendMail()
cRet := "Email sent."
ELSE
cRet := "Failed to send email."
ENDIF
RETURN cRet
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Sending email with default prog "Heli-Team.pl Portal" <admin1@heli-team.pl> - 2011-01-28 02:29 -0800 Re: Sending email with default prog "Willie Moore" <williem@wmconsulting.com> - 2011-01-28 08:48 -0600
csiph-web