Need "hMailServer.ch

56 views
Skip to first unread message

Vikram Chhajer

unread,
Jan 15, 2023, 1:48:14 AM1/15/23
to Harbour Users

Hello Experts 
Found This prg On net While Googling  to send mail   , need   "hMailServer.ch  "   to run this prg can  any one help with this .ch 



#include "hMailServer.ch"

//create hMailServer object
oServer := HMailServer():New()

//connect to the mail server
oServer:Connect("smtp.example.com", "username", "password")

//create hMail object
oMail := HMail():New()

//set the sender, recipient, subject, and body of the email
oMail:From("sen...@example.com")
oMail:To("reci...@example.com")
oMail:Subject("Hello from Harbour!")
oMail:Body("This is a test email sent from a Harbour program.")

//send the email
oServer:Send(oMail)

//disconnect from the mail server
oServer:Quit()

Thanks 

Vikram
Reply all
Reply to author
Forward
0 new messages