SMTP Relay Software


  1. Posts : 2,177
    Windows 8.1 Pro x64
       #1

    SMTP Relay Software


    Hi,

    Does anyone know of some software that will allow command line SMTP relay through gmail or something like that?

    I use postie.exe at work through our exchange system however i cant get it to work at home through gmail?

    Regards,
    JDobbsy1987
      My Computer


  2. Posts : 2,177
    Windows 8.1 Pro x64
    Thread Starter
       #2

    Hi All,

    I can't believe how long i was looking for a solution to my question before posting here and then almost instantly after i found something LOL.

    Here is what i have used along with command.

    I have used smtpmail from - Send E-Mail from the Command Line or Batch File

    and even better... they even give a gmail smtp command example and it worked perfectly
    Code:
    SMTPMAIL.EXE server=smtp.gmail.com from=smtpinfo.com@gmail.com to=info@smtpinfo.com user=smtpinfo.com@gmail.com password=mysecret ssl license=20110904ff4bb6de06366ba6cd414d69168b6bda subject="Hello via GMail!" body="This email was sent using the GMail SMTP server :-)"
    Obviously i just changed the info in the command line for my gmail account :)

    Regards,
    JDobbsy1987
      My Computer


  3. Posts : 2,177
    Windows 8.1 Pro x64
    Thread Starter
       #3

    Didn't take me long to realize that the above method only works for gmail with the pro version which costs money (you get a 30 day trial)

    however a little more search and found this vbscript that may be better if anyone is interested?
    More Info - scripting - How to send an email from one Gmail account to another one using a batch file or script? - Stack Overflow
    Code:
    Const schema   = "http://schemas.microsoft.com/cdo/configuration/"
    Const cdoBasic = 1
    Const cdoSendUsingPort = 2
    Dim oMsg, oConf
    
    ' E-mail properties
    Set oMsg      = CreateObject("CDO.Message")
    oMsg.From     = "from@gmail.com"  ' or "Sender Name <from@gmail.com>"
    oMsg.To       = "to@gmail.com"    ' or "Recipient Name <to@gmail.com>"
    oMsg.Subject  = "Subject"
    oMsg.TextBody = "Text body"
    
    ' GMail SMTP server configuration and authentication info
    Set oConf = oMsg.Configuration
    oConf.Fields(schema & "smtpserver")       = "smtp.gmail.com"
    oConf.Fields(schema & "smtpserverport")   = 465
    oConf.Fields(schema & "sendusing")        = cdoSendUsingPort
    oConf.Fields(schema & "smtpauthenticate") = cdoBasic
    oConf.Fields(schema & "smtpusessl")       = True
    oConf.Fields(schema & "sendusername")     = "from@gmail.com"
    oConf.Fields(schema & "sendpassword")     = "sender_password"
    oConf.Fields.Update
    
    oMsg.Send
    Regards,
    JDobbsy1987
      My Computer


  4. Posts : 2,066
    Windows 8 Pro w/MC 32-bit
       #4

    Command Line Response to smtpmail:

    C:\Windows>smtpmail.exe
    'smtpmail.exe' is not recognized as an internal or external command,
    operable program or batch file.
    C:\Windows>

    Also, a search of the Windows folder found nothing called "smtpmail", but there were about 16 items containing "smtp".

    [EDIT: Sorry, I should have read the link more carefully. "Smtpmail" is a downloadable application, not part of Windows.]
    Last edited by roncerr; 16 Nov 2011 at 06:14.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:12.
Find Us