|
-
Oct 5th, 2007, 08:11 PM
#1
Thread Starter
Fanatic Member
send listview data record by smtp
hello,please help,how to write the listview data record to text file send the email use smtp ?
thanks for help!
-
Oct 5th, 2007, 08:19 PM
#2
Re: send listview data record by smtp
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.
-
Oct 5th, 2007, 08:35 PM
#3
Thread Starter
Fanatic Member
Re: send listview data record by smtp
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!
-
Oct 5th, 2007, 10:25 PM
#4
Thread Starter
Fanatic Member
Re: send listview data record by smtp
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.
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
thanks for help!
Last edited by gracehskuo; Oct 7th, 2007 at 08:58 PM.
-
Oct 7th, 2007, 09:01 PM
#5
Thread Starter
Fanatic Member
Re: send listview data record by smtp
hello,can i use "App.path" as string ??
-
Oct 8th, 2007, 04:23 AM
#6
Re: send listview data record by smtp
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).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|