hello,please help,how to write the listview data record to text file send the email use smtp ?
thanks for help!:)
Printable View
hello,please help,how to write the listview data record to text file send the email use smtp ?
thanks for help!:)
To save content of a listview to a file check out sample code i posted here.
As far as emailing attachments search forum - there must be plenty of samples posted as well.
RhinoBull:
thanks reply.basically i can save the listview to text file.how about if automate to send the text file by email without save the text file to attachment to the local drive?
Thanks for help!
i face the problem with attach text file location.basically i have done the smtp sending email.but i want to code it better with the attach file location with "App.path" i post my code here please help have have a look.
thanks for help!:blush:Code:Private Sub cmdSendMail_Click()
With oSMTP
'connection
.Server = "10.0.0.250" 'local email server
'authentication
.AuthenticationType = AuthLogin
.UserName = "[email protected]"
.Password = "system"
.MailFrom = "[email protected]"
.SendTo = "[email protected]"
.SendTo = "[email protected]"
.MessageSubject = "Overtime confirm Alert "
.MessageText = "testing auto send smtp authentication "
.Attachments.Add "C:\OT.txt" how to set the attach text file location at App.Path
.SendEmail
End With
End Sub
hello,can i use "App.path" as string ??:blush:
Yes app.path is a string, path returned is where your executable resides. Since users are typically free to choose the path of the attachment (file may not be in same folder as executable), store the attachment path elsewhere (such as a string variable).