wolverine_twinz Posted August 3, 2004 Share Posted August 3, 2004 Hello everybody,I am trying to send an e-mail without using outlook, I use command lines. The thing is I am new to this and I don't know how to send an e-mail. I can compose one like this:START mailto:test@test.com?subject=subject^&body=textOne can use this statement in a .bat-file, for example:@echo offSTART mailto:test@test.com?subject=subject^&body=textI hope somebody can help me??I know there are commercial software who can handle the job, but I want to do it myself or freeware...Thanks in advance!Remco Link to comment Share on other sites More sharing options...
Innominandum Posted October 18, 2004 Share Posted October 18, 2004 You can use the source code found here to do it, but you must have some programming knowledge and VS.Net to compile it.I hope this helps. Link to comment Share on other sites More sharing options...
Rtano Posted October 18, 2004 Share Posted October 18, 2004 theres a couple command-line mailerXmail (xfocus.org)Bmail ( http://www.beyondlogic.org/solutions/cmdli...cmdlinemail.htm )ad example i use it for reporting backup status of a server.Byez Link to comment Share on other sites More sharing options...
JoeMSFN Posted June 8, 2005 Share Posted June 8, 2005 (edited) Funny I read this thread and had a nother browser window/tab open to that very same topic I stumbled upon earlier this evening/morning...Check out this thread How do I send e-mail from KiXtart? (SMTP) .Before you say... but I said the COMMAND LINE.... Note they mention several techniques, including BlatI've never used either one, so I can't help you beyond directing you to that post and site.(edit) Just re-read your post. Did you want to open up a new message so the user can type stuff before sending, or did you just want to send a message via the command line with no user interaction? Edited June 8, 2005 by JoeMSFN Link to comment Share on other sites More sharing options...
Martin Zugec Posted June 8, 2005 Share Posted June 8, 2005 I got two scripts for this purposes:First one is using actual Outlook configurationOption ExplicitDim objOutlook, objNameSpace, objMailDim strAddress, strSubject, strBody, strMailItemstrAddress = "martin.zugec@gmail.com"strSubject = "Test"strBody = "Automating send test"Set objOutlook = WScript.CreateObject("Outlook.Application")Set objNameSpace = objOutlook.getNamespace("MAPI")Set objMail = objOutlook.CreateItem(strMailItem)objMail.Subject = strSubjectobjMail.Body = strBodyobjMail.RecipIents.Add(strAddress)objMail.SendSET objOutlook = nothingSET objNameSpace = nothingSET objMail = nothingSecond one is using SMTP, so it is Outlook-independent.Option ExplicitDim objEmail, objNetworkDim strComputerNameSet objEmail = CreateObject("CDO.Message")Set objNetwork = CreateObject("Wscript.Network")strComputerName = objNetwork.ComputerNameWith objEmail .From = strComputerName & "@domain.com" .To = "martin.zugec@gmail.com" .Subject = "Test" .Textbody = "Testing mail delivery" .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "pred-hub.pre.cz" .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Configuration.Fields.Update .SendEnd WithSet objEmail = NothingSet objNetwork = Nothing Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now