vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
vb@rchiv Offline-Reader - exklusiv auf der vb@rchiv CD Vol.4  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Fortgeschrittene
email versand über outlook 
Autor: havok
Datum: 04.04.06 10:33

Hallo zusammen,

ich verschicke mit folgendem Code emails über Outlook 2003:

 Public Function startOutlook(ByVal toVal As String, ByVal subjectVal As _
   String, ByVal bodyVal As String)
        'Return a reference to the MAPI layer
        Dim ol As New Outlook.Application
        Dim ns As Outlook.NameSpace
        Dim fdMail As Outlook.MAPIFolder
 
        ns = ol.GetNamespace("MAPI")
 
        'Logs on the user
        'Profile: This is a string value that indicates what MAPI profile to 
        ' use for logging on. Leave blank if using the currently logged on 
        ' user, or set to an empty string ("") if you wish to use the default 
        ' Outlook Profile. 
        'Password: The password for the indicated profile. Leave blank if using 
        ' the currently logged on user, or set to an empty string ("") if you 
        ' wish to use the default Outlook Profile password. 
        'ShowDialog: Set to True to display the Outlook Profile dialog box. 
        'NewSession: Set to True to start a new session. Set to False to use 
        ' the current session. 
        ns.Logon(, , True, True)
 
        'create a new MailItem object
        Dim newMail As Outlook.MailItem
 
        'gets defaultfolder for my Outlook Outbox
        fdMail = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderSentMail)
 
        'assign values to the newMail MailItem
        newMail = fdMail.Items.Add(Outlook.OlItemType.olMailItem)
        newMail.Subject = subjectVal
        newMail.Body = bodyVal
        newMail.To = toVal
        newMail.SaveSentMessageFolder = fdMail
 
 
        'adds it to the draft box
        'newMail.Save()
 
        'adds it to the outbox
        newMail.Send()
        newMail = Nothing
 
 
 
 
    End Function
Nun bekomme ich aber bei jeder email die ich verschicke folgende Warnmeldung von Outlook:
"eine anwendung versucht, nachrichten in ihrem ausgang zu versenden"

Diese möchte ich abstellen, um nicht bei 100 emails 100x dies bestätigen zu müssen.

Vielen Dank für eure Hilfe

Gruß
HaVoK
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
email versand über outlook1.462havok04.04.06 10:33
Re: email versand über outlook982LarsThorwald05.04.06 07:55
Re: email versand über outlook946havok05.04.06 09:28
Re: email versand über outlook909Nikoman05.04.06 13:00
Re: email versand über outlook1.291havok05.04.06 13:42
Re: email versand über outlook971Nikoman05.04.06 22:39

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel