Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off && color f && MODE CON COLS=70 LINES=25
- echo.
- echo --------------------------------------------------------------------
- echo ENVIAR CORREO DESDE CMD
- echo --------------------------------------------------------------------
- echo.
- set /p para= Para:
- echo.
- set /p asunto= Asunto:
- echo.
- set /p mensaje= Mensaje:
- echo.
- echo.
- echo.
- color e
- FOR /L %%A IN (1,1,50) DO (
- echo -----------------------------PROCESANDO-----------------------------
- )
- echo.
- ::HERE STARTS THE PROCESS::::::::::::::::::::::::::::::::::::::::::::
- echo Set MyEmail=CreateObject("CDO.Message") >> temp.vbs
- echo Const cdoBasic=0 'Do not Authenticate >> temp.vbs
- echo Const cdoAuth=1 'Basic Authentication >> temp.vbs
- echo MyEmail.Subject = "%asunto%" >> temp.vbs
- echo MyEmail.From = "<antonioavelar962018@gmail.com>" >> temp.vbs
- echo MyEmail.To = "<%para%>" >> temp.vbs
- echo MyEmail.TextBody= "%mensaje%" >> temp.vbs
- echo MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 >> temp.vbs
- echo 'SMTP Server >> temp.vbs
- echo MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.gmail.com" >> temp.vbs
- echo 'SMTP Port >> temp.vbs
- echo MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 >> temp.vbs
- echo MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 >> temp.vbs
- echo 'Your UserID on the SMTP server >> temp.vbs
- echo MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "antonioavelar962018@gmail.com" >> temp.vbs
- echo 'Your password on the SMTP server >> temp.vbs
- echo MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "polloasado" >> temp.vbs
- echo 'Use SSL for the connection (False or True) >> temp.vbs
- echo MyEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True >> temp.vbs
- echo MyEmail.Configuration.Fields.Update >> temp.vbs
- echo MyEmail.Send >> temp.vbs
- echo Set MyEmail=nothing >> temp.vbs
- :: END OF THE PROCESS::::::::::::::::::::::::::::::::::::::::::::
- ::HIDING XD
- ::attrib +h temp.vbs
- if exist temp.vbs (
- rem file exists
- ::echo file exists
- call temp.vbs
- color a
- cls
- echo.
- echo -------------------------MENSAJE ENVIADO!!!-------------------------
- echo.
- del /f /q temp.vbs
- ) else (
- rem file doesn't exist
- ::echo file doesn't exist
- color c
- echo -------------------------------ERROR--------------------------------
- )
- echo.
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement