[Gambas-user] Send mail using SMTP

Benoit Minisini gambas at ...1...
Tue Dec 26 16:47:19 CET 2006


On Friday 22 December 2006 17:33, Pablo Terradillos wrote:
> Hi everyone, this is my first message on this list, and i'm a new Gamba's
> User...
>
> My question is about the gb.net.smtp component.
>
> I have two problems... with the way i have to use this component... let me
> explain...
>
> I want to send an email to "somebody at ...1623..." using my ISP's smtp
> server
>
> So... i put an smtpclient named smtpclient1 into my form a text box which
> contains the name of the sender and a text area which contains the message
> itself...
>
> how can i do it? i tried this way...
>
> smtpclient1.Host = "myispserver.com"
> smtpclient1.To = "somebody at ...1623..."
> smtpclient1.From = "myname"
>
> but of course... this doesn't works... Gambas says that "smtpclient.to is
> read only"
>
> So... my questions...
>
> 1- How is the correct way to use this component?
> 2- In which property would be the message? (the one's contained in the text
> area)
>
> Hope you can help me... i didn't found anything googling or in the
> Gambas'help...
>
> Thank's you in advance

You must write:

smtpclient1.To = ["somebody at ...1623..."]

'To' is a string array, so that you can specify more than one sender!

Regards,

-- 
Benoit Minisini





More information about the User mailing list