Results 1 to 6 of 6

Thread: send listview data record by smtp

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    584

    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!

  2. #2

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    584

    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!

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    584

    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.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    584

    Re: send listview data record by smtp

    hello,can i use "App.path" as string ??

  6. #6
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    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
  •  



Click Here to Expand Forum to Full Width