You are here: PSPad forum > České diskuzní fórum > PSmail

PSmail

#1 PSmail

Posted by: lazna | Date: 2016-09-10 21:04 | IP: IP Logged

Kdyz vidim odkaz na program PSmail www.pspad.com , vite o tom ze z windows lze uz asi 15 let odesilat maily BEZ POUZITI EXTERNIHO SW? Nechcete radeji propagovat tuto moznost?

L.

set "vbsfile=bat-email.vbs"
if not exist "%vbsfile%"" call :createVBS
:: defaults
set "fileattach="
set "From=''.phorum_html_encode('box@host.com').''"
set "To=''.phorum_html_encode('box@host.com').''"
set "Subj="This is subject""
set "Body="This is body""
set "Serv=smtp.host.com"
set "AuthEn=0"
set "Auth=user"
set "Pass=pass"
::
call :send %From% %To% %Subj% %Body% %Serv% %Auth% %Pass%
goto :EOF
::
:send
cscript.exe /NOLOGO %vbsfile% %1 %2 %3 %4 %5 %6 %7
goto :EOF
::
:createVBS
del "%vbsfile%" 1>NUL 2>&1
set "cdoSchema=http://schemas.microsoft.com/cdo/configuration"
echo >> "%vbsfile%" Set objArgs = WScript.Arguments
echo >> "%vbsfile%" Set objEmail = CreateObject("CDO.Message")
echo >> "%vbsfile%" objEmail.From = objArgs(0)
echo >> "%vbsfile%" objEmail.To = objArgs(1)
echo >> "%vbsfile%" objEmail.Subject = objArgs(2)
echo >> "%vbsfile%" objEmail.Textbody = objArgs(3)
if defined fileattach echo >> "%vbsfile%" objEmail.AddAttachment "%fileattach%"
echo >> "%vbsfile%" with objEmail.Configuration.Fields
echo >> "%vbsfile%" .Item ("%cdoSchema%/sendusing") = 2 ' not local, smtp
echo >> "%vbsfile%" .Item ("%cdoSchema%/smtpserver") = objArgs(4)
echo >> "%vbsfile%" .Item ("%cdoSchema%/smtpserverport") = 25
echo >> "%vbsfile%" .Item ("%cdoSchema%/smtpauthenticate") = %AuthEn% ' cdobasic
echo >> "%vbsfile%" .Item ("%cdoSchema%/sendusername") = objArgs(5)
echo >> "%vbsfile%" .Item ("%cdoSchema%/sendpassword") = objArgs(6)
echo >> "%vbsfile%" .Item ("%cdoSchema%/smtpusessl") = False
echo >> "%vbsfile%" .Item ("%cdoSchema%/smtpconnectiontimeout") = 25
echo >> "%vbsfile%" .Update
echo >> "%vbsfile%" end with
echo >> "%vbsfile%" objEmail.Send
GOTO:EOF
::
::
GOTO:EOF
::
:END

Options: Reply | Quote | Up ^


#2 Re: PSmail

Posted by: pspad | Date: 2016-10-01 17:31 | IP: IP Logged

Díky za skript.
PSMail je hodne stary nastroj, pouzival jsem jej jeste za dob Windows 9x, kdy jsem z DOS programu pres nej posilal maily.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2019 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR