[Gambas-user] File name with smtp
Jacky
jscops at ...11...
Sat Aug 4 09:12:01 CEST 2007
Le Friday 03 August 2007 22:02:08 timothy, vous avez écrit :
> > -----Original Message-----
> > From: gambas-user-bounces at lists.sourceforge.net [mailto:gambas-user-
> > bounces at lists.sourceforge.net] On Behalf Of Jacky
> > Sent: Friday, 03 August 2007 10:44 AM
> > To: mailing list for gambas users
> > Subject: [Gambas-user] File name with smtp
> >
> > Hi,
> >
> > With SmtpClient i send my files correctly but the file name i recieved
>
> is
>
> > alway "MIME part #1". Is there a way to have a same filename recieved
>
> as
>
> > the
> > filename send ?
> >
> > Jack
>
> Hello,
>
> When you add the attachment you can specify the mime type and name as
> optional parameters.
>
>
> PUBLIC SUB SendMoreMail()
> DIM simpleSmtpClient AS NEW SmtpClient
> WITH simpleSmtpClient
> .Host = "smtp.myserver.com"
> .From = "my.email at ...1745..."
> .Subject = "Test du composant SMTP de Gambas - " & Str(Now)
> .Alternative = FALSE
> .To.Add("to.email at ...1745...")
> .Add("File Content", "text/plain", "FileName.txt")
> .Send()
> END WITH
> END
>
> So in the example above your attachment will have the name FileName.txt.
Bonjour Timothy,
It's Ok.
Thank you very much to your reply.
Jack
More information about the User
mailing list