[Gambas-user] File name with smtp

timothy timothy.marshal-nichols at ...247...
Fri Aug 3 22:02:08 CEST 2007


> -----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.


Thanks

8-{)} Timothy Marshal-Nichols
<mailto: timothy.marshal-nichols at ...247...>







More information about the User mailing list