[Gambas-user] Sending E-Mail...

Ru Vuott vuott at ...325...
Mon Mar 18 23:55:41 CET 2013


Hello Willy,

thanks a lot ! I communicated via Forum to our friend your gentle answer.

I'll let you know a possible additional message.

Bye
vuooott


--- Lun 18/3/13, Willy Raets <willy at ...2734...> ha scritto:

> Da: Willy Raets <willy at ...2734...>
> Oggetto: Re: [Gambas-user] Sending E-Mail...
> A: gambas-user at lists.sourceforge.net
> Data: Lunedì 18 marzo 2013, 21:50
> On Mon, 2013-03-18 at 18:55 +0000, Ru
> Vuott wrote:
> > Hello,
> > 
> > I would like to point out what a forum member of
> "Gambas-it.org" wrote about the problem of sending email:
> > 
> > ********
> > These days I tried the component gb.net.smtp with poor
> results, then I started to study and I made a small class to
> send mail with a Telnet terminal.
> > 
> > But I would like to know if the Socket of gambas could
> somehow replace Telnet to communicate with the SMTP server.
> > 
> >    220 posta.hextra.it Service ready
> > 
> > and then it seems to disconnect !!!
> > 
> > Have you had similar experiences ?
> > 
> > *********
> > 
> > Well, as we can help our friend?
> > 
> > Thanks
> > 
> > vuott
> > 
> What seems to be the problem as I have no trouble sending
> mail usingI commented out the encryption as I don't get it to work. But that is
not a Gambas problem as my regular (non Gambas mail client) can't send
SSL or TSL either
> gb,net.smtp
> 
> This is an example directly from one of my projects.
> Note that info is retrieved from setting on a mail
> preferences form
> where user can set the values and they are saved as
> settings.
> 
> Nore: All settings are string values from settings file
> using
> gb.settings.
> Settings["mail/from"] = yourmail at ...3115...
> Settings["mail/smtp"] = smtp.yourprovider.org
> Settings["mail/port"] = 25
> 
> DefaultMail is a Public String variable I use to provide my
> own mail
> address.
> I use this routine for error trapping and having error info
> send back to
> me automatically if Mail Preferences are set.
> 
> It works like a charm..
> 
> Private Sub SendMail(TextToSend As String, Subject As
> String)
>   
>   Dim hMail As New SmtpClient
>   hMail.To.Add(DefaultMail)
>   hMail.From = Settings["mail/from"]
>   hMail.Host = Settings["mail/smtp"]
>   hMail.Port = Settings["mail/port"]
>   'If Settings["mail/tsl"] = -1 Then
>   '  hMail.Encrypt = 2
>   'Else
>     hMail.Encrypt = 0
>   'Endif
>   hMail.Subject = Subject
>   hMail.Add(TextToSend)
>   hMail.Send
>   MailSend = True
> 
> End
> 
> I commented out the encryption as I don't get it to work.
> But that is
> not a Gambas problem as my regular (non Gambas mail client)
> can't send
> SSL or TSL either.
> 
> Hope this can help your friend
> 
> -- 
> Kind regards,
> 
> Willy (aka gbWilly)
> 
> http://gambasshowcase.org/
> http://howtogambas.org
> http://gambos.org
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list