
autow
Active Members-
Posts
34 -
Joined
-
Last visited
autow's Achievements

Seeker (1/7)
0
Reputation
-
Smtp Mailer That Supports Html And Attachments.
autow replied to Jos's topic in AutoIt Example Scripts
I try use the mail.com smtp and get this error... ### COM Error ! Number: 80020009 ScriptLine: 132 Description:Falha na conexão do transporte com o servidor. How to fix? -
Hi buddies,i work in a Market Company and need code script for send mail...i code using one a UDF but i got several problems... I ask for help but i wanna learn what is wrong #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ;Vars do programa Local $state[5] $Default = FileReadLine ("./unity/defcom.pif",1) ;END $state[1] = "Waiting" $state[2] = "Waiting" $state[3] = "Waiting" $state[4] = "Waiting" $state[5] = "Waiting" #Region ### START Koda GUI section ### Form=c:\documents and settings\usuário\desktop\meusfiles\pastas\koda\forms\form2_1.kxf Global $Form2_1 = GUICreate("SysSofts - Inbox", 813, 500, 336, 90) Global $Load = GUICtrlCreateButton("Load Conf", 304, 8, 75, 17) Global $Create = GUICtrlCreateButton("Create Conf", 384, 8, 75, 17) Global $Prev = GUICtrlCreateButton("Preview", 552, 8, 75, 17, 0) Global $Clean = GUICtrlCreateButton("Clean", 648, 8, 75, 17, 0) GUICtrlSetBkColor(-1, 0xFF0000) GUICtrlSetTip(-1, "17") Global $Send = GUICtrlCreateButton("Send", 728, 8, 75, 17, 0) GUICtrlSetBkColor(-1, 0x00FF00) Global $Edit1 = GUICtrlCreateEdit("", 0, 123, 835, 385) GUICtrlSetData(-1, "Edit1") Global $Group1 = GUICtrlCreateGroup("Configurações", 0, 0, 289, 105) Global $Label2 = GUICtrlCreateLabel("SMTP:", 32, 16, 37, 17) Global $Label3 = GUICtrlCreateLabel("SSL:", 40, 32, 27, 17) Global $Label4 = GUICtrlCreateLabel("List:", 48, 48, 23, 17) Global $Label5 = GUICtrlCreateLabel("from:", 40, 64, 27, 17) Global $Label6 = GUICtrlCreateLabel("user / pass:", 8, 80, 60, 17) Global $Label7 = GUICtrlCreateLabel("$state1", 72, 16, 39, 17) Global $Label8 = GUICtrlCreateLabel("$state1", 72, 32, 39, 17) Global $Label9 = GUICtrlCreateLabel("$state1", 72, 48, 39, 17) Global $Label10 = GUICtrlCreateLabel("$state1", 72, 64, 39, 17) Global $Label11 = GUICtrlCreateLabel("$state1", 72, 80, 39, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $Label1 = GUICtrlCreateLabel("Subject:", 296, 96, 43, 17) Global $Sub = GUICtrlCreateInput("Sub", 344, 96, 121, 21) Global $MenuItem2 = GUICtrlCreateMenu("File") Global $MenuItem5 = GUICtrlCreateMenuItem("Confs", $MenuItem2) Global $MenuItem4 = GUICtrlCreateMenuItem("Menssage", $MenuItem2) Global $MenuItem3 = GUICtrlCreateMenuItem("exit", $MenuItem2) Global $MenuItem1 = GUICtrlCreateMenu("About") Global $MenuItem7 = GUICtrlCreateMenuItem("Licence", $MenuItem1) Global $MenuItem6 = GUICtrlCreateMenuItem("Autors", $MenuItem1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Local $Read[7] , $Decrypted[7] Func _Fload() $Passwd = "InboB6?" $FileInput = FileOpenDialog("Inbox project file open",@DesktopDir,"Inbox Conf (*.conf)") $Read[1] = FileReadLine ($FileInput,1) $Read[2] = FileReadLine ($FileInput,2) $Read[3] = FileReadLine ($FileInput,3) $Read[4] = FileReadLine ($FileInput,4) $Read[5] = FileReadLine ($FileInput,5) $Read[6] = FileReadLine ($FileInput,6) $Read[7] = FileReadLine ($FileInput,7) $Decrypted[1] =_StringEncrypt(0,$Read[1],$Passwd,2) $Decrypted[2] =_StringEncrypt(0,$Read[2],$Passwd,2) $Decrypted[3] =_StringEncrypt(0,$Read[3],$Passwd,2) $Decrypted[4] =_StringEncrypt(0,$Read[4],$Passwd,2) $Decrypted[5] =_StringEncrypt(0,$Read[5],$Passwd,2) $Decrypted[6] = _StringEncrypt(0,$Read[6],$Passwd,2) $Decrypted[7] =_StringEncrypt(0,$Read[7],$Passwd,2) If $Decrypted[1] = -1 Then $State[1] = "ERROR!" Else $State[1] = "OK" EndIf If $Decrypted[2] = -1 Then $State[2] = "ERROR!" Else $State[2] = "OK" EndIf If $Decrypted[3] = -1 Then $State[3] = "ERROR!" Else $State[3] = "OK" EndIf If $Decrypted[4] = -1 Then $State[4] = "ERROR!" Else $State[4] = "OK" EndIf If $Decrypted[5] = -1 Then $State[4] = "ERROR!" Else $State[4] = "OK" EndIf If $Decrypted[6] = -1 Then $State[5] = "ERROR!" Else $State[5] = "OK" EndIf If $Decrypted[7] = -1 Then $State[5] = "ERROR!" Else $State[5] = "OK" EndIf EndFunc Func _ESPM($s_SmtpServer = $Decrypted[1] , $s_FromName = $Decrypted[4], $s_FromAddress = $Decrypted[5], $s_ToAddress = "jdoe@computer4u.com", $s_Subject = GUICtrlRead($Sub), $as_Body = GUICtrlRead($Edit1), $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = FileRead($Decrypted[3]) $s_Importance="Low", $s_Username = $Decrypted[6], $s_Password = $Decrypted[7], $IPPort = 25 , $ssl = $sslcheck) Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x]) ConsoleWrite('@@ Debug(62) : $S_Files2Attach = ' & $S_Files2Attach & @LF & '>Error code: ' & @error & @LF) ;### Debug Console If FileExists($S_Files2Attach[$x]) Then $objEmail.AddAttachment ($S_Files2Attach[$x]) Else ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF) SetError(1) Return 0 EndIf Next EndIf $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer If Number($IPPort) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True EndIf ;Update settings $objEmail.Configuration.Fields.Update ; Set Email Importance Switch $s_Importance Case "High" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High" Case "Normal" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal" Case "Low" $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low" EndSwitch $objEmail.Fields.Update ; Sent the Message $objEmail.Send If @error Then SetError(2) Return $oMyRet[1] EndIf $objEmail="" EndFunc ;==>_INetSmtpMailCom While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Load _Fload() Case $Create Create() Case $Prev $Fileoutput = FileSaveDialog ("Message preview",@DesktopDir,"HTML Files (*.html)") FileWrite($Fileoutput,$Edit1) MsgBox (0,"Done","File Saved") Case $Clean GUICtrlSetData ($Edit1,"") Case $Send If $Decrypted[2] = 0 Then $sslcheck = 0 EndIf If $Decrypted[2] = 1 Then $sslcheck = 1 _ESpm() EndSwitch WEnd
-
i try 212 and got incorrect decrypt
-
Thanks bu t still not working
-
the sintax is ok...i dont post the password in topic..but offline i put the password
-
My script dont decrypt to original text: What is problem? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <File.au3> #Include <String.au3> #include <Crypt.au3> #include <WinAPI.au3> #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Form1", 192, 289, 193, 125) $Label1 = GUICtrlCreateLabel("Login:", 8, 16, 33, 17) $Usuario = GUICtrlCreateInput("Usuario", 48, 16, 121, 21) $Label2 = GUICtrlCreateLabel("Senha:", 8, 48, 38, 17) $Password = GUICtrlCreateInput("Password", 48, 48, 121, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) $Label3 = GUICtrlCreateLabel("Hkey:", 8, 80, 32, 17) $Hkey = GUICtrlCreateInput("Hkey", 48, 80, 121, 21) $Encrypt = GUICtrlCreateButton("Encrypt", 8, 112, 75, 25) $Decrypt = GUICtrlCreateButton("Decrypt", 96, 112, 75, 25) $Label4 = GUICtrlCreateLabel("Codado por:Raphael winicius", 8, 264, 179, 17) $Label5 = GUICtrlCreateLabel("Login:", 8, 176, 33, 17) $Label6 = GUICtrlCreateLabel("Senha:", 8, 208, 38, 17) $Label7 = GUICtrlCreateLabel("Hkey:", 8, 144, 32, 17) $Key = GUICtrlCreateInput("Hkey", 48, 144, 121, 21) $Senha = GUICtrlCreateInput("SenhaDecriptada", 48, 208, 121, 21) $LoginDede = GUICtrlCreateInput("Usuario", 48, 176, 121, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Encrypt _Crypt_Startup() $File1 = FileSaveDialog ("Salvar arquivo com senhas",@ScriptDir,"Text files (*.txt)") _FileCreate ($File1) $ToWrite1 = _Crypt_DeriveKey ($Hkey,$CALG_RC4) $ToWrite2 = _Crypt_EncryptData ($Usuario," ",$CALG_RC2) $ToWrite3 = _Crypt_EncryptData ($Password," ",$CALG_RC2) $RealWrite1 = _FileWriteToLine ($File1,1,$ToWrite1) $RealWrite2 = _FileWriteToLine ($File1,2,$ToWrite2) $RealWrite3 = _FileWriteToLine ($File1,3,$ToWrite3) _Crypt_DestroyKey ($ToWrite1) _Crypt_Shutdown() Case $Decrypt _Crypt_Startup() $File = FileOpenDialog ("Abrir arquivo com senhas",@ScriptDir,"Text files (*.txt)") $ToDecrypt1 = FileReadLine ($file,1) $ToDecrypt2 = FileReadLine ($file,2) $ToDecrypt3 = FileReadLine ($file,3) $CryptKey = _Crypt_DeriveKey ($key,$CALG_RC4) $GrantKey = _Crypt_DeriveKey ($ToDecrypt1,$CALG_RC4) $Decrypt1 = _Crypt_DecryptData ($ToDecrypt2," ",$CALG_RC2) $Decrypt2 = _Crypt_DecryptData ($ToDecrypt3," ",$CALG_RC2) GUICtrlSetData ($LoginDede,$Decrypt1) GUICtrlSetData ($Senha,$Decrypt2) _Crypt_Shutdown() EndSwitch WEnd
-
if i dont mistake ! is alt..
-
i need change the code,now he save in a txt file but have some bugs...he save crazy stuff #include <GUIConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <File.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\Usuário\Desktop\Form1.kxf $Form1 = GUICreate("Form1", 487, 261, 474, 137) $Data = GUICtrlCreateInput("", 64, 8, 65, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER)) $Label1 = GUICtrlCreateLabel("Data:", 16, 8, 30, 17) $Label2 = GUICtrlCreateLabel("Cliente:", 16, 80, 39, 17) $Label3 = GUICtrlCreateLabel("Usuário:", 16, 40, 43, 17) $Label4 = GUICtrlCreateLabel("Problema", 24, 120, 48, 17) $Label5 = GUICtrlCreateLabel("Inicio:", 184, 8, 32, 17) $Label6 = GUICtrlCreateLabel("Fim", 184, 40, 20, 17) $Hora1 = GUICtrlCreateInput("00", 224, 8, 25, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER)) $pts = GUICtrlCreateLabel(":", 256, 8, 7, 17) $Min1 = GUICtrlCreateInput("00", 264, 8, 25, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER)) $Hora2 = GUICtrlCreateInput("00", 224, 40, 25, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER)) $Label7 = GUICtrlCreateLabel(":", 256, 40, 7, 17) $Min2 = GUICtrlCreateInput("00", 264, 40, 25, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER)) $Label8 = GUICtrlCreateLabel("Soluçao", 248, 120, 43, 17) $User = GUICtrlCreateInput("User", 64, 40, 97, 21) $Pobrema = GUICtrlCreateEdit("", 0, 137, 213, 121) GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKBOTTOM) $Solucao = GUICtrlCreateEdit("", 240, 138, 246, 121) GUICtrlSetResizing(-1, $GUI_DOCKRIGHT+$GUI_DOCKBOTTOM) $Cliente = GUICtrlCreateInput("Cliente", 64, 80, 97, 21) $Button1 = GUICtrlCreateButton("Salvar", 328, 8, 83, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Func Save() $LOG = $Data & ";" & $Cliente & ";" & $User & ";" & $Pobrema & ";" & $Solucao & ";" & $Hora1 & ":" & $Min1 & ";" & $Hora2 & ":" & $Min2 $file = FileSaveDialog("Salve File", "", "All files (*.txt;)") _FileWriteToLine ($file,InputBox("Linha","Insira a linha para salvar"),$LOG,1) EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Save() EndSwitch WEnd
-
Hi buddies i need write some data in a excel file (1 edit and 1 input) the input contains day,month and year,the edit contains the data my code dont have any error but he doesnt write data:(I dont know how to use Excel Functions and i had try read help file) #include <GUIConstants.au3> #include <Excel.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 431, 277, 836, 156) $Label1 = GUICtrlCreateLabel("Data:", 8, 40, 30, 17) $Input1 = GUICtrlCreateInput("00/00/00", 56, 40, 57, 21) $Edit1 = GUICtrlCreateEdit("", 0, 131, 430, 145) $Input2 = GUICtrlCreateInput("0", 56, 72, 41, 21) $Label2 = GUICtrlCreateLabel("Linha:", 8, 72, 33, 17) $Label3 = GUICtrlCreateLabel("Coluna", 8, 104, 37, 17) $Input3 = GUICtrlCreateInput("0", 56, 104, 41, 21) $Button1 = GUICtrlCreateButton("Entrar Dados", 192, 8, 75, 25, 0) $Label4 = GUICtrlCreateLabel("Arquivo:", 8, 8, 43, 17) $Exemplo = GUICtrlCreateInput("Exemplo.csv", 56, 8, 121, 21) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Func Entra() $File = GUICtrlRead($Exemplo) $Handle = _ExcelBookOpen ($File,0) If @error Then MsgBox (0,"Error","ERR") EndIf $Cell = $Input3 & $Input2 _ExcelWriteCell ($Handle,$Edit1,$cell) If @error Then MsgBox (0,"Error","ERR") EndIf _ExcelBookClose($Handle) If @error Then MsgBox (0,"Error","ERR") EndIf MsgBox (0,"Salvo","Seus Dados foram salvos") EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Entra () EndSwitch WEnd
-
thanks,now i need help to send/receive information: 1-I need specify a ip address to receive the connection whit TCPlisten? For now is just this,thanks for all
-
yeah but why i get the response?
-
But in this case i need use Run,and in my work i cannot show anything in diretor pcs...because this i nedd to use RunDos
-
example:type ipconfig in your dos,you get info,i need this info,you can help me?
-
How to get command result whit _RunDos?
-
i have just little code serverside.au3