thomas1972
Goto Top

CDO Message Fields erweitern. X-MSMail-Priority X-Priority Important sowie Übermittlungsbestätigung keine Funktion

Hallo ,

ich versuche auf die Maileigenschaften Einfluss zu nehmen,

leider funktioniert dieses leider nicht,
die Mail kommt immer nur mit Standarteinstellungen an.
Kann mir jemand erklären was ich falsch eingestellt habe

Sub CDO_config()
   '==This section provides the configuration information for the remote SMTP server.  
   sendusing = 2           '==Normally you will only change the server name or IP.  
   smtpserver = "xx.xx.xx.xx" '   
   smtpserverport = 25                            'Server port (typically 25)  
   '==End remote SMTP server configuration section==  

   Sender = "xxxxx@xxxx"             ' Absender E-mail adresse  
   SenderName = """xxxxxxxx" ' Absender Name"  
End Sub

   
Set objMessage = CreateObject("CDO.Message")  

Call CDO_config

  With objMessage.Configuration.Fields
    '==This section provides the configuration information for the remote SMTP server.  
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = sendusing           '==Normally you will only change the server name or IP.  
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver         'Name or IP of Remote SMTP Server  
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = smtpserverport 'Server port (typically 25)  
    .Update
    '==End remote SMTP server configuration section==  
  End With
   
      ' ###################### Mail Senden  ######################  
    
    With objMessage
        .Subject = EMailbetreff
        .Sender = Sender   ' Absender  
        .FROM = SenderName ' Absendername  
        .BCC = Empfaenger
     
      
        .textBody = Mailtext
        .textBodyPart.ContentMediaType = "text/plain"  
        .textBodyPart.Charset = "ISO-8859-1"  
        .textBodyPart.ContentTransferEncoding = "quoted-printable"  
        
  
        ' Lesebestätigung Anfordern  
        .Fields("urn:schemas:mailheader:disposition-notification-to") = "user@test.de" 'ToDo: Type a valid e-mail address.  
        .Fields.Update
      
        
        'Set DSN options.  
        '    Name                   Value       Description  
        '    cdoDSNDefault             0       No DSN commands are issued.  
        '    cdoDSNNever               1       No DSN commands are issued.  
        '    cdoDSNFailure             2       Return a DSN if delivery fails.  
        '    cdoDSNSuccess             4       Return a DSN if delivery succeeds.  
        '    cdoDSNDelay               8       Return a DSN if delivery is delayed.  
        '    cdoDSNSuccessFailOrDelay  14      Return a DSN if delivery succeeds, fails, or is delayed.  
        .DSNOptions = cdoDSNSuccessFailOrDelay
        .DSNOptions = 14
        .DSNOptions.Update
        
       'Dringlichkeit einbinden  
       ' Prio  
        .Fields("urn:schemas:mailheader:X-MSMail-Priority") = "High" ' For Outlook 2003  
        .Fields("urn:schemas:mailheader:X-Priority") = 2 ' For Outlook 2003 also  
        .Fields("urn:schemas:httpmail:importance") = 2 ' For Outlook Express  
        .Fields.Update
     On Error Resume Next
     .Send

Inhalt der Internetkopfzeilen:
Received: from xxxx (xxx) by xxxxx
(xxx) with Microsoft SMTP Server id 14.3.210.2; Fri, 16 Jan 2015
13:50:32 +0100
thread-index: AdAxiwOMULcOYeivQ4iKxYt82P+T2w==
Thread-Topic: xxxxx
From: xxx <xxx@xxxxxt>
Sender: <xxxxx@xxxxt>
BCC:
Subject: Performance Probleme in Cross
Date: Fri, 16 Jan 2015 13:50:32 +0100
Message-ID: <xxxx@xxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal -> WIRD NICHT VERÄNDERT
Priority: normal -> WIRD NICHT VERÄNDERT
X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609
Return-Path: xxx@xxxxx -> WIRD NICHT VERÄNDERT
X-MS-Exchange-Organization-AuthSource: xxxxx
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 10
X-MS-Exchange-Organization-AVStamp-Mailbox: NAI;56077888;0;novirus


Grüße aus München

Content-Key: 260080

Url: https://administrator.de/contentid/260080

Printed on: April 19, 2024 at 11:04 o'clock

Mitglied: 114757
114757 Jan 16, 2015 at 15:44:42 (UTC)
Goto Top
Moin,

Erstens:
Den Notification Flag können Mailserver ohne Vorwarnung ignorieren und entfernen. Das machen z.B. Hoster wie GMX und Co.

Zweitens:
Der Header "Return-Path" hat nix mit der Notification-Adresse zu tun.

Drittens:
Zur Priority könntest du noch folgendes probieren:
.Fields(cdoImportance) = cdoHigh


Gruß jodel32