Jump to content

Smtp Mailer That Supports Html And Attachments.


Jos
 Share

Recommended Posts

The "tansport bla bla" message can be found 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.

Link to comment
Share on other sites

With mailserver I mean the value you assign to variable $SmtpServer.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

#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 ("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") = 1

$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

$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

;

;##################################

; 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 ("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") = 1

$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

$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
Link to comment
Share on other sites

Do you get any COM error messages? Does _INetSmtpMailCom return an error?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 1 month later...

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?

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 1 month later...

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
Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
Share on other sites

Which version of Windows do you use?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Never done it before myself but I think this link should help.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Looks like they missed to add Windows 7. Here you can download the same version with Windows 7 mentioned.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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"

Link to comment
Share on other sites

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...