Welcome!

By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.

SignUp Now!

How to? SendMail and SSL

Aug
1,821
59
Hi,

Code:
TCC  15.01.51  Windows Vista [Version 6.0.6002]
TCC Build 51  Windows Vista Build 6002  Service Pack 2
Registered to Joe Caverly - 1 System License

I am having a problem with SendMail. I have renamed my email name and password in this message.

Code:
which sendmail
sendmail is an internal command

I tried this;

Code:
sendmail /v [email protected] Test1 Test2
Connecting to mail server.
error during handshake[2]: 0x80090308
Failed to connect: error during handshake[2]: 0x80090308
Disconnected.
TCC: error during handshake[2]: 0x80090308

then this;

Code:
sendmail /v /SSL=2 [email protected] Test1 Test2
TCC: (Sys) The requested name is valid, but no data of the requested type was found.
 "SL=2"

Is it just me, or does sendmail not like the /SSL=2 argument? Not sure I really need it, though, since that option is already set in my TCMD.INI file.

Here's the email section of my TCMD.INI file;

Code:
MailServer=smtp.gmail.com
[email protected]
MailPort=587
MailUser=me
MailPassword=mypassword
MailSSL=Yes
RLocalPort=0
SHLocalPort=0
SSHPort=22
SSLStartMode=0
SSLPort=587

I have no problem sending email using PowerShell;

Code:
$EmailFrom = "[email protected]"                                                                 
$EmailTo = "[email protected]"                                                              
$Subject = "Hello."                                                                            
$Body = "Test Message."                                                                           
$SMTPServer = "smtp.gmail.com"                                                                     
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)                                     
$SMTPClient.EnableSsl = $true                                                                      
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("me", "mypassword")    
$SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)

Must be something simple that I am not doing correctly with SendMail, so please feel free to point it out to me.

Thanks from Joe

Code:
TCC  15.01.51   Windows Vista [Version 6.0.6002]
TCC Build 51   Windows Vista Build 6002  Service Pack 2
Registered to Joe Caverly - 1 System License
 

Similar threads

Back
Top