August 3, 200422 yr 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
October 18, 200421 yr 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.
October 18, 200421 yr 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
June 8, 200521 yr 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, 200521 yr by JoeMSFN
June 8, 200521 yr 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
Create an account or sign in to comment