[Help/Request] file emailer menu

User Tag List

Results 1 to 8 of 8
  1. #1
    Insignia's Avatar Banned
    Reputation
    24
    Join Date
    Oct 2007
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help/Request] file emailer

    okay,

    i am looking for a program that will email me a my log files from my server every day. i would like it to basically have a conf-type file that lets me point out the 3 logs i want emailed to me and my email i want to have them on.
    either that or a simple gui but that is more difficult i am pretty sure that a conf would be better. i have my server on my friends computer and i belive they are not only abusing gm powers overly but are speedhacking and majorly modding things i warn them not to. i also have core editing chat log to be sure. this is why i want them emailed to me. the more discrete the program the better. a core edit that will use my ascent-world.conf file that uses a directive such as this

    Code:
    ###################################
    #  E-mailer directive
    #  
    #  File1
    #
    #  File2
    #
    #  File3
    #
    #  Email address
    #
    ###################################
    
    < E-Mail File1="FILEPATH 1"
          File2="FILEPATH 2"
          File3="FILEPATH 3"
          Email="MY EMAIL"
    would be 1337


    if you could lead me in the right directon of sourcecode too. i am a c++ n00b also. +Rep to ppl who can help.

    [Help/Request] file emailer
  2. #2
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Some vb.net for you.

    Code:
    Dim mymail As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage() 
    
    mymail.From = "[email protected]"  'Set this to what you want the from address to show as
    mymail.To = "[email protected]" 'Set this to your email address
    mymail.Subject = "Email Subject" 'Set this to the subject you want. You don't need to set a subject, though.
    mymail.Body = "This is the text of the email, set it to whatever you like. You don't need to have this set, though."
    Dim mylogs1 As MailAttachment = New MailAttachment("C:log1.txt")  'Set the path to your log file
    mymail.Attachments.Add(mylogs1) 'This just adds the attachment to the email
    Dim mylogs2 As MailAttachment = New MailAttachment("C:log2.txt")  'Set the path to another log file
    mymail.Attachments.Add(mylogs2) 'Again, just adds the attachment
    'Repeat those 2 lines for every log you want to attach
    Dim SMTPServer As New SmtpClient("smtp.gmail.com") 'This is an example for Gmail, you can set the SMTP to whatever you like.
    SMTPServer.Port = 587 'The Gmail smtp port. If not using Gmail, remove this line
    SMTPServer.Credentials = New System.Net.NetworkCredential("your gmail address here", "your gmail password here") 'This is used because the Gmail smtp server is secured. Remove this line if you don't need to authenticate to access the smtp server.
    SMTPServer.EnableSsl = True 'Remove if it's not an ssl secured smtp server
    SMTPServer.Send(mymail) 'Sends the mail
    That should do the trick.

  3. #3
    Insignia's Avatar Banned
    Reputation
    24
    Join Date
    Oct 2007
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    +rep dude, exactly what i needed! also is there a way that i can make the body say "LOG FILES AT: DATE/TIME"?

  4. #4
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    mymail.Body = "Log files sent at " & Today
    Make that the body and it should work. Glad it helps

  5. #5
    Insignia's Avatar Banned
    Reputation
    24
    Join Date
    Oct 2007
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thankx dude u rock. gonna try compiling it in a bit if this crappy thing im on now can handle it.(desktop cpu melted down, on ancient laptop now)

  6. #6
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Should be able to. It's not supremely strenuous code. Couple of things to note though, that's vb.net coding (I use vb.net express 2008 atm) and you WILL need .NET framework installed on the machine that's running this. Not sure which version though.

  7. #7
    Insignia's Avatar Banned
    Reputation
    24
    Join Date
    Oct 2007
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so the visual basic express edition and .net 3.5 is all i need?

  8. #8
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Visual Basic Express Edition will be able to compile that code into a little .exe for you

    As for .NET 3.5, that might need to be installed on the computer that's running the exe (though it might well be installed already, and you might not need .NET 3.5, .NET 3.0 or .NET 2.0 might be enough)

Similar Threads

  1. [Help Request] Someone with knowledge of ADT file specifically MCVT chunk
    By DJRehab in forum WoW ME Questions and Requests
    Replies: 13
    Last Post: 04-17-2010, 10:33 AM
  2. Getting A Friend Connected (Help Request)
    By Magnusvermis in forum World of Warcraft Emulator Servers
    Replies: 9
    Last Post: 12-07-2007, 11:57 PM
  3. Help Request
    By sirios in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 10-14-2007, 12:47 PM
  4. Help, FINAL WARNING email just recieved.
    By Bazral in forum World of Warcraft General
    Replies: 6
    Last Post: 01-10-2007, 04:57 PM
  5. Please - Requesting file ..
    By dumbledrew in forum World of Warcraft General
    Replies: 0
    Last Post: 11-05-2006, 01:48 AM
All times are GMT -5. The time now is 03:20 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search