Results 1 to 4 of 4

Thread: Collecting data from ms outlook

  1. #1

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Collecting data from ms outlook

    Hello everyone, I am here to ask if how can I collect data coming from ms outlook. What I want is that i need a program that will collect the email address of the bounced-back emails and the reason why they bounce. Is it possible? If yes then how can i do it? If no, then I have another options I am using Mail Them Pro program for email marketing, how can i get their data like for example if the mail are sent successfully or not? Hope to get a solution for this problem. Have nice day everyone.

  2. #2
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: Collecting data from ms outlook

    Use the outlook references and search for internet samples.

    http://www.codenewsgroups.net/group/...topic3009.aspx

  3. #3

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Re: Collecting data from ms outlook

    Thanks zynder....Have a nice day and God Bless..

  4. #4
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Collecting data from ms outlook

    I haven't tested it but this should work...

    vb Code:
    1. Private Sub Application_NewMail()
    2.     '~~> We will checking for this string in the subject
    3.     strChk = "Delivery Status Notification (Failure)"
    4.    
    5.     On Error Resume Next
    6.  
    7.     Set oFolder = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
    8.    
    9.     On Error GoTo 0
    10.    
    11.     For Each oNewItem In oFolder.Items.Restrict("[Unread] = 0")
    12.         subj = oNewItem.Subject
    13.         Ebody = oNewItem.Body
    14.         If InStr(1, subj, strChk) > 0 Then
    15.             '~~> the email address is stored like this
    16.             '~~> To: <[email protected]>
    17.            
    18.             pos1 = InStr(1, Ebody, "To: <")
    19.             pos2 = InStr(pos1, Ebody, ">")
    20.             If pos1 > 0 Then
    21.                 '~~> This will give you the email address
    22.                 MsgBox Mid(Ebody, pos1 + 5, pos2 - pos1 + 1)
    23.             End If
    24.         End If
    25.     Next
    26. End Sub

    Edit: Similarly, you can get the reason why they bounce If you get stuck let me know... we will get this sorted...
    Last edited by Siddharth Rout; Apr 5th, 2009 at 11:04 AM.
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width