Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Smtp Mailer That Supports Html And Attachments.


  • Please log in to reply
600 replies to this topic

#441 Aapjuh

Aapjuh

    Seeker

  • Active Members
  • 23 posts

Posted 30 July 2012 - 08:00 PM

The "tansport bla bla" message can be found here. In the next post you'll find a few things to check.


what do you mean with mailserver?
im just trying to send mail from 1 hotmail to another hotmail using the smtp.live.com.
thought that be enough.







#442 water

water

    ?

  • MVPs
  • 15,338 posts

Posted 30 July 2012 - 09:27 PM

With mailserver I mean the value you assign to variable $SmtpServer.
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#443 DarkDeveloper

DarkDeveloper

    Seeker

  • Active Members
  • 14 posts

Posted 31 July 2012 - 04:24 PM

My code sends emails from my work laptop to the destination email address but does not send emails from certain other PCs (whiteboards) while the original code sends emails from both sucessfully. Has anyone else had a problem like this or did I code something wrong?

My Code
AutoIt         
#comments-start WhiteBoard Auto Logon 7/18/2012 Andrew Vasbinder This code will auto logon a whiteboard pc when compiled into an executable and put in the startup folder on a pc. !!!The only part that should be edited is the "Case" statements when a new computer is added, a computer name/login/exe file are changed. Recommended for this program is to have the cerner.exe shortcut in the startup folder C:\Documents and Settings\All Users\Start Menu\Programs\Startup Function descriptions at end. #comments-end ;################################## ; Include ;################################## #Include #include ;USERNAME AND PASSWORD VARIABLES Global $username, $password, $cernerEXE, $computerName, $activeWindow, $loadCount = 0 ;################################## ; Variables ;################################## Global $SmtpServer = "10.20.1.36" ; address for the smtp-server to use - REQUIRED Global $FromName = $computerName ; name from who the email was sent Global $FromAddress = $computerName & "@oaklawnhospital.com" ; address from where the mail should come Global $ToAddress = "helpdesk@oaklawnhospital.com" ; destination address of the email - REQUIRED Global $Subject = "" ; subject from the email - can be anything you want it to be Global $Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail Global $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed Global $CcAddress = "" ; address for cc - leave blank if not needed Global $BccAddress = "" ; address for bcc - leave blank if not needed Global $Importance = "High" ; Send message priority: "High", "Normal", "Low" Global $Username = "" ; username for the account used from where the mail gets sent - REQUIRED Global $Password = "" ; password for the account used from where the mail gets sent - REQUIRED Global $IPPort = 25 ; port used for sending the mail Global $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ;PROGRAM START _runProgram() ;PROGRAM END ;FUNCTION TO LOAD VARIABLES BASED ON COMPUTER NAME Func _variableLoad() _getCompName() #comments-start Sample for adding new computer Case "Computer Name" $username = "Username" $password = "Password" $cernerEXE = "program.exe" $activeWindow = "Task Manager Bar Name (i.e. P:\WBLogon)" #comments-end Switch $computerName Case "OR660AG" $username = "mainorboard" $password = "cerner" $cernerEXE = "snsurginet.exe" $activeWindow = "SNSurgiNet" Case "OR660AQ" $username = "waitingroomboard" $password = "cerner" $cernerEXE = "snsurginet.exe" $activeWindow = "SNSurgiNet" Case "WBOR1" $username = "mainorboard" $password = "cerner" $cernerEXE = "snsurginet.exe" $activeWindow = "SNSurgiNet" Case "WBOR2" $username = "prepostboard" $password = "cerner" $cernerEXE = "snsurginet.exe" $activeWindow = "SNSurgiNet" Case "WBOR3" $username = "prepostboard" $password = "cerner" $cernerEXE = "snsurginet.exe" $activeWindow = "SNSurgiNet" Case "WBTEST" $username = "prepostboard" $password = "cerner" $cernerEXE = "snsurginet.exe" $activeWindow = "SNSurgiNet" Case "PPR905E" $username = "waitingroomboard" $password = "cerner" $cernerEXE = "snsurginet.exe" $activeWindow = "SNSurgiNet" Case "WBER1" $username = "edgrease" $password = "edgrease" $cernerEXE = "firstnet.exe" $activeWindow = "FirstNet" ;Check for computer name again and exit if it is still incorrect Case Else If $loadCount = 0 Then $loadCount += 1 _variableLoad() ElseIf $loadCount = 1 Then MsgBox(1,"Error 01","Error!" & @CRLF & "Computer is not compatible with script.",5) $Subject = "Whiteboard " & $computerName & " failed to launch." $Body = "The whiteboard " & $computerName & " is not recognized as a valid whiteboard. Please contact your system administrator." _buildEmail() Exit Else MsgBox(1,"Error 02", "An unknown error occurred.",5) $Subject = "Whiteboard " & $computerName & " failed to launch." $Body = "The whiteboard " & $computerName & " has encountered an unknown error. Reboot the computer. If the problem persists contact your system administrator." _buildEmail() Exit EndIf EndSwitch EndFunc ;FUNCTION TO CHECK IF STARTUP CERNER.EXE IS OPEN Func _verifyEXE() Local $exeCount = 0 While $exeCount <= 8 ProcessWait ("CERNSE~1.EXE",30) If ProcessExists("CERNSE~1.EXE") = 0 And $exeCount = 8 Then Run("C:\Program Files\CERNER\" & $cernerEXE) $exeCount = 0 EndIf $exeCount += 1 WEnd EndFunc ;FUNCTION TO ACTIVATE WINDOWS AND ENTER CREDENTIALS Func _populateCreds() While WinActive("HNAM") = 0 WinActivate ("HNAM") WEnd Sleep(5000) AutoItSetOption("SendKeyDelay",1000) Send($username & "{TAB}" & $password & "{ENTER}") While WinActive($activeWindow) = 0 WinActivate($activeWindow) WEnd AutoItSetOption("SendKeyDelay",5000) If ($activeWindow == "FirstNet") Then Sleep (10000) Send ("n") Sleep (15000) Send("{ALT}LB") Else Sleep(15000) Send("{ALT}LL{ENTER}B") EndIf $Subject = "Whiteboard " & $computerName & " has launched." $Body = "The whiteboard " & $computerName & " launched without encountering an error." MouseMove(0,0) EndFunc ;FUNCTION TO CHECK COMPUTER NAME Func _getCompName() $computerName = @ComputerName EndFunc ;FUNCTION TO RUN PROGRAM IN CORRECT ORDER Func _runProgram() _variableLoad() _verifyEXE() _populateCreds() _buildEmail() Exit EndFunc ;FUNCTION TO BUILD THE EMAIL BASED ON LOADED VARIABLES Func _buildEmail() $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl) ; If @error Then ; MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc,5) ; EndIf ; ; The UDF EndFunc ;################################## ; EMAIL FUNCTION !!!DO NOT ALTER!!! ;################################## Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) 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 : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console If FileExists($S_Files2Attach[$x]) Then ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF) $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 ("<a href='http://schemas.microsoft.com/cdo/configuration/sendusing' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/sendusing"</a>) = 2 $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/smtpserver' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/smtpserver"</a>) = $s_SmtpServer If Number($IPPort) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/smtpserverport' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/smtpserverport"</a>) = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/smtpauthenticate' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"</a>) = 1 $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/sendusername' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/sendusername"</a>) = $s_Username $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/sendpassword' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/sendpassword"</a>) = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/smtpusessl' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/smtpusessl"</a>) = 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 $objEmail.Fields.Update $objEmail.Send SetError(2) Return $oMyRet[1] EndIf $objEmail="" EndFunc ; COM ERROR HANDLER Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) $oMyRet[0] = $HexNumber $oMyRet[1] = StringStripWS($oMyError.description, 3) ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF) SetError(1); something to check for when this function returns Return EndFunc ;==>MyErrFunc #comments-start FUNCTION DESCRIPTIONS _getCompName(): Uses AutoIt macro to find the local computer name. _variableLoad(): Tries to match computer name to load credentials. Has a second run through as a backup incase the first one fails for some reason. Multiple errors for debugging purposes. _verifyEXE(): Checks to see if process CERNSE~1.EXE is running. If it is running the while loop will finish and the program proceeds. If it is not running the .exe is run and the loop starts over to make sure it is running. _populateCreds(): Makes active window, enters password, set preference to "Show Board" _runProgram(): Runs program in order. _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) : Email configuration function. !!!!!!!!!DO NOT ALTER!!!!!!!!!!! _MyErrFunc(): Function build for errors in _INetSmtpMailCom #comments-end


Original Code
AutoIt         
; ;################################## ; Include ;################################## #Include ;################################## ; Variables ;################################## $SmtpServer = "10.20.1.36" ; address for the smtp-server to use - REQUIRED $FromName = "LT168" ; name from who the email was sent $FromAddress = "LT168@oaklawnhospital.com" ; address from where the mail should come $ToAddress = "username@oaklawnhospital.com" ; destination address of the email - REQUIRED $Subject = "Userinfo" ; subject from the email - can be anything you want it to be $Body = "" ; the messagebody from the mail - can be left blank but then you get a blank mail $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed $CcAddress = "" ; address for cc - leave blank if not needed $BccAddress = "" ; address for bcc - leave blank if not needed $Importance = "Normal" ; Send message priority: "High", "Normal", "Low" $Username = "" ; username for the account used from where the mail gets sent - REQUIRED $Password = "" ; password for the account used from where the mail gets sent - REQUIRED $IPPort = 25 ; port used for sending the mail $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS ;~ $IPPort=465 ; GMAIL port used for sending the mail ;~ $ssl=1 ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS ;################################## ; Script ;################################## Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl) If @error Then MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc) EndIf ; ; The UDF Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) 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 : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console If FileExists($S_Files2Attach[$x]) Then ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF) $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 ("<a href='http://schemas.microsoft.com/cdo/configuration/sendusing' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/sendusing"</a>) = 2 $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/smtpserver' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/smtpserver"</a>) = $s_SmtpServer If Number($IPPort) = 0 then $IPPort = 25 $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/smtpserverport' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/smtpserverport"</a>) = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/smtpauthenticate' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"</a>) = 1 $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/sendusername' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/sendusername"</a>) = $s_Username $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/sendpassword' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/sendpassword"</a>) = $s_Password EndIf If $ssl Then $objEmail.Configuration.Fields.Item ("<a href='http://schemas.microsoft.com/cdo/configuration/smtpusessl' class='bbc_url' title='External link' rel='nofollow external'>http://schemas.microsoft.com/cdo/configuration/smtpusessl"</a>) = 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 $objEmail.Fields.Update $objEmail.Send SetError(2) Return $oMyRet[1] EndIf $objEmail="" EndFunc ;==>_INetSmtpMailCom ; ; ; Com Error Handler Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) $oMyRet[0] = $HexNumber $oMyRet[1] = StringStripWS($oMyError.description, 3) ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF) SetError(1); something to check for when this function returns Return EndFunc ;==>MyErrFunc


#444 water

water

    ?

  • MVPs
  • 15,338 posts

Posted 01 August 2012 - 05:59 AM

Do you get any COM error messages? Does _INetSmtpMailCom return an error?
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#445 DarkDeveloper

DarkDeveloper

    Seeker

  • Active Members
  • 14 posts

Posted 01 August 2012 - 01:29 PM

I get the error message:

Error code:2 Description:The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available.

When I telnet to the server and send a "helo" command sometimes I get a "500 syntax error". If I keep sending helo messages it will connect. The number of times is random. Sometimes it is first try, sometimes fifth.

Again, the error is only with my code. The source code will send an email.

Edit: I can also send SMTP email when I telnet.

Edited by DarkDeveloper, 01 August 2012 - 01:44 PM.


#446 Alodar

Alodar

    Wayfarer

  • Active Members
  • Pip
  • 52 posts

Posted 06 September 2012 - 11:44 PM

You are sure that:
- MailServer IP address used is correct. - Yes
- You have the SMTP service Enabled on your Mailserver. - To my knowledge
- You allow the SMTP for the PC/Server you are sending the Email from. - To my knowledge

Have you checked the Server's Logs to see what is happening? - Can't, not mine
What kind of mailserver are you running? - Gmail
Is this a local or a Provider's Mailserver? - Provider's
Have you tried sending an EMail with for example OutlookExpress to this server just to test SMTP? - Yes
Have you tested with Regular SMTP with the CDO UDF? - No, not quite sure on that.

I use the one provided, and it worked fine before, but now the only result I get is the transport failed to connect to the server.

That's why it's odd to me, it USED to work? Could something have changed?

#447 RichardL

RichardL

    Prodigy

  • Active Members
  • PipPipPip
  • 171 posts

Posted 15 September 2012 - 08:54 PM

I've used this and it's very good on all my e-mail accounts, but I'm trying to use it with a BT Business broadband account. The details I've tried are:

 ;$SMTPSERVER = "mail.btinternet.com" ; Immediate fail, ; The message could not be sent to the SMTP server. ; The transport error code was 0x80040217. ; The server response was not available $SMTPSERVER = "mail.btconnect.com" ; 65 Sec, The transport failed to connect to the server ;$SMTPSERVER = "smtp.btconnect.com" ; 65 Sec, The transport failed to connect to the server ;$SMTPSERVER = "mail.bt.com" ; 65 Sec, The transport failed to connect to the server ;$SMTPSERVER = "mail.noserver.com" ; 9 Seconds, The transport failed to connect to the server. $FROMADDRESS = "a.b.c@btconnect.com" $USERNAME = "a.b.c@btconnect.com" $PASSWORD = "abc" $IPPORT = Int(587) ;$IPPORT = Int(25)


Has anyone done this? Can you tell me if any of the above are definitely right or wrong?

Thanks,

Richard.

#448 vacko

vacko

    Seeker

  • Active Members
  • 21 posts

Posted 31 October 2012 - 11:28 AM

Hi, this function seems not working under WinPE.
On line with
Local $objEmail = ObjCreate("CDO.Message")
it return COM error 800401F3
Do you know why and if can be solved somehow ?

Edit: I found that CDO.Message object is missing in WinPE, but how to add ?
I tried copy cdosys.dll & msoert2.dll into system32, then run regsvr32 cdosys.dll but still it doesn't work...

Edited by vacko, 31 October 2012 - 12:27 PM.


#449 EmptySpace

EmptySpace

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 294 posts

Posted 25 November 2012 - 11:28 AM

This udf works fine for me but when I send to my friend who lives in France he gets error "error code 2: message could not be sent to the smtp server. the transport error code was 0x80040217 " any ideas? I saw many of people all the time get this error but couldnt find any solution... I really need this udf to work

#450 water

water

    ?

  • MVPs
  • 15,338 posts

Posted 25 November 2012 - 11:34 AM

Which version of Windows do you use?
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#451 EmptySpace

EmptySpace

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 294 posts

Posted 25 November 2012 - 11:47 AM

My win is xp, my friend have win 7

#452 water

water

    ?

  • MVPs
  • 15,338 posts

Posted 25 November 2012 - 11:48 AM

Then the problem is caused by the Windows 7 installation. CDO (wich is used by the UDF) no longer comes with Windows 7.
Details and how to install it can be found here.
  • VelvetElvis likes this
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#453 EmptySpace

EmptySpace

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 294 posts

Posted 25 November 2012 - 11:55 AM

So I can install it manually? I cand find which file needs to instal..

#454 water

water

    ?

  • MVPs
  • 15,338 posts

Posted 25 November 2012 - 11:59 AM

Never done it before myself but I think this link should help.
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#455 EmptySpace

EmptySpace

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 294 posts

Posted 25 November 2012 - 12:02 PM

"Supported operating systems: Windows 2000, Windows Server 2003, Windows Server 2008, Windows Vista, Windows XP"
I dont see win 7 here

#456 water

water

    ?

  • MVPs
  • 15,338 posts

Posted 25 November 2012 - 12:06 PM

Looks like they missed to add Windows 7. Here you can download the same version with Windows 7 mentioned.
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#457 EmptySpace

EmptySpace

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 294 posts

Posted 25 November 2012 - 12:51 PM

Thats interesting. Before I used http://www.autoitscript.com/forum/topic/141340-remote-gmail-udf/ where phoenix used same udf. It worked for my friend with win 7 but gmail didnt let to login into acc (protect from hijacking)...

#458 water

water

    ?

  • MVPs
  • 15,338 posts

Posted 25 November 2012 - 12:59 PM

As the Phoenix UDF works (which uses CDO too) then there has to be another problem.
Does the COM error handler of this UDF provide the line number where the error occurres?
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#459 EmptySpace

EmptySpace

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 294 posts

Posted 25 November 2012 - 01:12 PM

No numbers or something. For me it works fine. I sent compiled program to my friend. When he try to open it msgbox pop ups "Error sending message Error code:2 Description:The message could not be send to the SMTP server. The transport error code was 0x80040217. The server response was not avaible"

#460 water

water

    ?

  • MVPs
  • 15,338 posts

Posted 25 November 2012 - 01:22 PM

That's the COM error handler. Try to replace the MyErrFunc with
Func _MyErrFunc()     MsgBox(0, "Error", "err.number is: " & $oMyError.number & @CRLF & _        "err.windescription: " & $oMyError.windescription & @CRLF & _        "err.description is: " & $oMyError.description & @CRLF & _        "err.source is: " & $oMyError.source & @CRLF & _        "err.helpfile is: " & $oMyError.helpfile & @CRLF & _        "err.helpcontext is: " & $oMyError.helpcontext & @CRLF & _        "err.lastdllerror is: " & $oMyError.lastdllerror & @CRLF & _        "err.scriptline is: " & $oMyError.scriptline & @CRLF & _        "err.retcode is: " & $oMyError.retcode & @CRLF & @CRLF) EndFunc ;==>_MyErrFunc
and run the uncompiled script to get the line number.

Edited by water, 25 November 2012 - 01:24 PM.

UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users