Subject Re: Sending email
From Richard <rclark4@nycap.rr.com>
Date Thu, 11 Apr 2024 10:25:56 -0400
Newsgroups dbase.getting-started

I got VDBMail working after quite a bit of experimentation:
THis is what works on my system:
        vdbPath =  .... // path to mv_mail.cc on your system
        success = email.register(vdbPath, true)
        email.setport(587)
        email.setSSL(false)
        email.setUser(my_name) // leave off the @company-group.com
Good luck

On Wed, 10 Apr 2024 23:21:00 -0400, AGOSTINHO
<Agostinhoteixeira@yahoo.com> wrote:

>Dear group,
>I'm trying to send an email using Marc VdB's test program.
>When entering all the information to set up and run it I get the following error.
>Error:  OLE Unable to create object.
>
>See Marc's program with my modification below.
>
>// Marc VdB's test program to get VdBMail working:
>set direc to c:\users\home_pc\desktop\dbasetutorial\dbase2021/vdbmail
>set procedure to mv_mail.cc
>email = new mv_mail()
>
>//oleautoclient not yet registered or unable to to create ...
>if email.errorcode = 371 or email.errorcode = 370
>   //? "Not registered"
>        success = email.register()
>else
>   //? "Already registered!"
>   success = true
>endif
>
>if not success
>        ? email.errortext // registration failed
>        return
>endif
>
>// set the SMTP : your account data comes here
>email.sethost("smtp.company-group.com")
>email.setport(25)
>email.setuser("my_name@company-group.com")
>email.setpw("MY_PASSWORD")
>email.setssl(true)
>
>// set the individual mail data
>email.setfrom("my_name@company-group.com")
>email.setsubject("testing")
>email.setbody("xxxx")
>email.sethtmlbody(true)
>// uses an array for multiple email addresses
>email.setaddress({"send_to@yahoo.com"})
>email.setattachment("any.txt")
>
>email.send()
>
>? email.errorcode , email.errortext
>
>