Hallo zusammen,
Ich habe eine (wahrscheinlich) dumme Frage, zu der ich aber keine verständliche Lösung gefunden habe.
Und zwar habe ich mit o.g. Bibliothek so meine Sorgen. Vielleicht kennt die ja jemand, ich habe sie von hier:
https://www.autoitscript.com/forum/topic/89321-outlook-udf/
Ich wollte im ersten Schritt einfach nur eine Testmail senden an "Empfaengeradresse".
Ich habe Outlook auf dem PC und bin auch angemeldet, d.h. Mails senden und Empfangen funktioniert.
Also $success wird 0 zurück gegeben.
Aber in @error steht auch 0... wie kann das sein? In der Beschreibung steht, dass @error nichtmehr 0 sein kann wenn das Mail senden nicht funktioniert hat. (also $success gleich 0 ist)
Wo liegt mein Fehler?
#include <GUIConstantsEx.au3>
#include <Clipboard.au3>
#include <WindowsConstants.au3>
#include <Outlook.au3>
$outlook = _OutlookOpen()
$success = _OutlookSendMail($outlook, "Empfaengeradresse", "", "", "Test", "Dies ist eine Testmail", "", $olFormatPlain, $olImportanceNormal, "")
MsgBox(1,"geht?",$success)
MsgBox(1,"Errorcode",@error)
Danke sehr.
edit:
Hier noch die Beschreibung zu entsprechender Klasse:
;===============================================================================
;
; Function Name: _OutlookSendMail()
; Description: Send an email using Microsoft Outlook.
; Syntax.........: _OutlookSendMail($oOutlook, $sTo = "", $sCc = "", $sBCc = "", $sSubject = "", $sBody = "", $sAttachments = "", $iBodyFormat = $olFormatUnspecified, $iImportance = $olImportanceNormal, $sWarningClick = "")
; Parameter(s): $oOutlook - Outlook object opened by a preceding call to _OutlookOpen()
; $sTo - Optional: The recipiant(s), separated by ;
; $sCc - Optional: The CC recipiant(s) of the mail, separated by ;
; $sBCc - Optional: The BCC recipiant(s) of the mail, separated by ;
; $sSubject - Optional: The Subject of the mail
; $sBody - Optional: The Body of the mail
; $sAttachments - Optional: Attachments, separated by ;
; $iBodyFormat - Optional: The Bodyformat of the mail, default = $olFormatUnspecified
; $iImportance - Optional: The Importance of the mail, default = $olImportanceNormal
; $sWarningClick - Optional: The Entire SearchString to 'OutlookWarning1.exe', Default = None
; Requirement(s): AutoIt3 with COM support (post 3.1.1)
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0 and sets @ERROR > 0
; @ERROR = 1 - No To, Cc or BCc specified.
; @ERROR = 2 - OutlookWarning1.exe not found.
; @ERROR = 9 - ObjEvent error.
; Author(s): Wooltown
; Created: 2009-02-09
; Modified: 2009-02-24 - Several attachments didn't work
;
;===============================================================================
Alles anzeigen