Subject |
Re: Sending Email |
From |
Daniel Georgi <daniel.georgi@hytec-hydraulik.de> |
Date |
Tue, 7 Oct 2025 09:01:35 +0200 |
Newsgroups |
dbase.getting-started |
Am 06.10.2025 um 16:29 schrieb Jan Hoelterling:
> Milind,
>
> I've been using Chilkat for a long time with very good results.
>
> Here is some sample code that shows how easy it is to use:
>
> set proc to :classes:CK.CC
>
> mailman = new CK_Mailman()
>
> if type("_app.ms") <> "O"
> // email settings
> _app.MS = new object()
> _app.MS.SmtpUsername = "****"
> _app.MS.SmtpPassword = "****"
> _app.MS.SmtpHost = "****"
> _app.MS.SmtpPort = 587
> endif
>
> * Set the SMTP server.
> mailman.SmtpHost = _app.MS.SmtpHost
> mailman.SmtpPort = _app.MS.SmtpPort
> if _app.MS.SmtpPort = 587
> mailman.StartTLS = 1
> endif
>
> * Set the SMTP login/password (if required)
> if empty(_app.MS.SmtpUsername)
> mailman.SmtpAuthMethod = "NONE"
> else
> mailman.SmtpUsername = _app.MS.SmtpUsername
> mailman.SmtpPassword = _app.MS.SmtpPassword
> endif
>
> * Create a new email object
> email = new CK_EMAIL()
> email.Subject = "Subject"
> email.From = "Error Reporting <****>"
> email.AddTo("Jan Hoelterling","***")
>
> if type("cAttachFile") = "C"
> Success = email.AddFileAttachment(sspath+cAttachFile)
> endif
>
> email.Body = "Message text to send"
>
> success = mailman.SendEmail(email)
>
> I hope this helps,
>
> Jan
Hello Jan,
have you implemented OAuth 2 for microsoft?
Chilkat should be able to do that.
I also have a licence, but didn't have time yet to implement it.
Thanks
Daniel
|
|