Jump to content

azkirak

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by azkirak

  1. Hi all, Trying to test sending an email using the _INetSmtpMail function, but I cannot get it to work. #include <Inet.au3> #include <MsgBoxConstants.au3> Local $s_SmtpServer = "smtp.gmail.com" Local $s_FromName = "My Name" Local $s_FromAddress = "x@gmail.com" Local $s_ToAddress = "x@gmail.com" Local $s_Subject = "Test - subject line" Local $as_Body[2] $as_Body[0] = "Test" $as_Body[1] = "End of test" Local $iResponse = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) Local $iErr = @error If $iResponse = 1 Then     MsgBox($MB_SYSTEMMODAL, "Success!", "Mail sent") Else     MsgBox($MB_SYSTEMMODAL, "Error!", "Mail failed with error code " & $iErr) EndIf "Mail failed with error code 50" is the message I receive. I've looked at what the autoit help page says: 50x - Cannot send body. x indicates the line number of $aBody (first line is 0). I cannot find any solution online that has fixed this issue. Any guidance would be much appreciated!
  2. Thanks for your response! I have not yet started working on this script - tomorrow morning I should have some code to work with. I was hoping someone would already have something like this they could just paste in here if it already existed or was discussed before, but my searches did not return this specific problem. I'll update this with my code tomorrow.
  3. Hello everyone, I have the follow string: "Here is some text that should not be replaced. | this is the string that needs to be replaced | this is some ending text that should not be replaced." I would like to replace the string inside the pipes with "replacement string" and also keep the pipes for future replacements. What would be best practice for doing something like this? It is in a text field, so I am thinking I would need to copy the text field to the clipboard, make the edits, then paste it back to the text field before saving. I would assume that StringReplace andor _StringBetween could be utilized? Thanks
×
×
  • Create New...