Is it possible to yank a snippet of text from multiple emails?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







1















I'm a web admin, and our website's error reporting is set up to send me emails when an error occurs.



I received about 300+ emails over the weekend, all with similar errors. I want to export a report from the emails that includes only a specific part of the text. Is this doable?



For reference:



[HTTP_HOST] => www.ourwebsite.com
[HTTP_REFERER] => http://www.refererwebsite.com


I'd like to export a list of all of the [HTTP_REFERER]'s from the list of emails.



I want to rule out that this was an attempted DDOS attack.



Edit:
I realize that it might be doable to export this from the PHP superglobal, but I'm not familiar enough with it to know if it will do what I need it to.










share|improve this question































    1















    I'm a web admin, and our website's error reporting is set up to send me emails when an error occurs.



    I received about 300+ emails over the weekend, all with similar errors. I want to export a report from the emails that includes only a specific part of the text. Is this doable?



    For reference:



    [HTTP_HOST] => www.ourwebsite.com
    [HTTP_REFERER] => http://www.refererwebsite.com


    I'd like to export a list of all of the [HTTP_REFERER]'s from the list of emails.



    I want to rule out that this was an attempted DDOS attack.



    Edit:
    I realize that it might be doable to export this from the PHP superglobal, but I'm not familiar enough with it to know if it will do what I need it to.










    share|improve this question



























      1












      1








      1








      I'm a web admin, and our website's error reporting is set up to send me emails when an error occurs.



      I received about 300+ emails over the weekend, all with similar errors. I want to export a report from the emails that includes only a specific part of the text. Is this doable?



      For reference:



      [HTTP_HOST] => www.ourwebsite.com
      [HTTP_REFERER] => http://www.refererwebsite.com


      I'd like to export a list of all of the [HTTP_REFERER]'s from the list of emails.



      I want to rule out that this was an attempted DDOS attack.



      Edit:
      I realize that it might be doable to export this from the PHP superglobal, but I'm not familiar enough with it to know if it will do what I need it to.










      share|improve this question
















      I'm a web admin, and our website's error reporting is set up to send me emails when an error occurs.



      I received about 300+ emails over the weekend, all with similar errors. I want to export a report from the emails that includes only a specific part of the text. Is this doable?



      For reference:



      [HTTP_HOST] => www.ourwebsite.com
      [HTTP_REFERER] => http://www.refererwebsite.com


      I'd like to export a list of all of the [HTTP_REFERER]'s from the list of emails.



      I want to rule out that this was an attempted DDOS attack.



      Edit:
      I realize that it might be doable to export this from the PHP superglobal, but I'm not familiar enough with it to know if it will do what I need it to.







      email microsoft-outlook exchange office365






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 28 at 22:44









      fixer1234

      19.5k145082




      19.5k145082










      asked Nov 21 '16 at 16:18









      TiffanyTiffany

      1085




      1085






















          1 Answer
          1






          active

          oldest

          votes


















          1















          1. In Outlook, go to Options, Customize Ribbon, and check the box next to "Developer" in the right-hand pane to enable the Developer options in the Ribbon.


          2. On the Ribbon, click Developer, then Visual Basic.


          3. Expand "Project1" and double-click on "ThisOutlookSession".



          4. Paste in this code:





            Sub dragonborn()
            'Declare variables
            Dim fus As Object, ro As Object, dah As String, wuld As RegExp, na As MatchCollection
            'Set up the regular expression defining what you want to look for
            Set wuld = New RegExp
            wuld.Pattern = "HTTP_REFERER]s*=>s*(.+)"
            'Get your "Inbox" mailbox folder for the current open account
            Set fus = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
            'Loop through each item in Inbox that's an email
            For Each ro In fus.Items
            On Error GoTo here
            If TypeOf ro Is Outlook.MailItem Then
            dah = ro.Body
            'Attempt to match the email's body against your regex pattern
            Set na = wuld.Execute(dah)
            If na.Count > 0 Then
            'Print the result to the Immediate Window (View -> Immediate Window) if there's a match
            Debug.Print na.Item(0).SubMatches(0)
            End If
            End If
            here:
            On Error GoTo 0
            Next
            End Sub


          5. Run it (default hotkey: F5)


          6. Watch your Immediate Window.







          share|improve this answer


























          • What was the purpose of the edit @Gareth ? I don't see any difference whatsoever in the post. Can you please explain? I'm not offended, just confused.

            – allquixotic
            Nov 21 '16 at 21:14











          • Just a minor edit to align the code with step 4.

            – 3498DB
            Nov 21 '16 at 21:34












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1148227%2fis-it-possible-to-yank-a-snippet-of-text-from-multiple-emails%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1















          1. In Outlook, go to Options, Customize Ribbon, and check the box next to "Developer" in the right-hand pane to enable the Developer options in the Ribbon.


          2. On the Ribbon, click Developer, then Visual Basic.


          3. Expand "Project1" and double-click on "ThisOutlookSession".



          4. Paste in this code:





            Sub dragonborn()
            'Declare variables
            Dim fus As Object, ro As Object, dah As String, wuld As RegExp, na As MatchCollection
            'Set up the regular expression defining what you want to look for
            Set wuld = New RegExp
            wuld.Pattern = "HTTP_REFERER]s*=>s*(.+)"
            'Get your "Inbox" mailbox folder for the current open account
            Set fus = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
            'Loop through each item in Inbox that's an email
            For Each ro In fus.Items
            On Error GoTo here
            If TypeOf ro Is Outlook.MailItem Then
            dah = ro.Body
            'Attempt to match the email's body against your regex pattern
            Set na = wuld.Execute(dah)
            If na.Count > 0 Then
            'Print the result to the Immediate Window (View -> Immediate Window) if there's a match
            Debug.Print na.Item(0).SubMatches(0)
            End If
            End If
            here:
            On Error GoTo 0
            Next
            End Sub


          5. Run it (default hotkey: F5)


          6. Watch your Immediate Window.







          share|improve this answer


























          • What was the purpose of the edit @Gareth ? I don't see any difference whatsoever in the post. Can you please explain? I'm not offended, just confused.

            – allquixotic
            Nov 21 '16 at 21:14











          • Just a minor edit to align the code with step 4.

            – 3498DB
            Nov 21 '16 at 21:34
















          1















          1. In Outlook, go to Options, Customize Ribbon, and check the box next to "Developer" in the right-hand pane to enable the Developer options in the Ribbon.


          2. On the Ribbon, click Developer, then Visual Basic.


          3. Expand "Project1" and double-click on "ThisOutlookSession".



          4. Paste in this code:





            Sub dragonborn()
            'Declare variables
            Dim fus As Object, ro As Object, dah As String, wuld As RegExp, na As MatchCollection
            'Set up the regular expression defining what you want to look for
            Set wuld = New RegExp
            wuld.Pattern = "HTTP_REFERER]s*=>s*(.+)"
            'Get your "Inbox" mailbox folder for the current open account
            Set fus = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
            'Loop through each item in Inbox that's an email
            For Each ro In fus.Items
            On Error GoTo here
            If TypeOf ro Is Outlook.MailItem Then
            dah = ro.Body
            'Attempt to match the email's body against your regex pattern
            Set na = wuld.Execute(dah)
            If na.Count > 0 Then
            'Print the result to the Immediate Window (View -> Immediate Window) if there's a match
            Debug.Print na.Item(0).SubMatches(0)
            End If
            End If
            here:
            On Error GoTo 0
            Next
            End Sub


          5. Run it (default hotkey: F5)


          6. Watch your Immediate Window.







          share|improve this answer


























          • What was the purpose of the edit @Gareth ? I don't see any difference whatsoever in the post. Can you please explain? I'm not offended, just confused.

            – allquixotic
            Nov 21 '16 at 21:14











          • Just a minor edit to align the code with step 4.

            – 3498DB
            Nov 21 '16 at 21:34














          1












          1








          1








          1. In Outlook, go to Options, Customize Ribbon, and check the box next to "Developer" in the right-hand pane to enable the Developer options in the Ribbon.


          2. On the Ribbon, click Developer, then Visual Basic.


          3. Expand "Project1" and double-click on "ThisOutlookSession".



          4. Paste in this code:





            Sub dragonborn()
            'Declare variables
            Dim fus As Object, ro As Object, dah As String, wuld As RegExp, na As MatchCollection
            'Set up the regular expression defining what you want to look for
            Set wuld = New RegExp
            wuld.Pattern = "HTTP_REFERER]s*=>s*(.+)"
            'Get your "Inbox" mailbox folder for the current open account
            Set fus = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
            'Loop through each item in Inbox that's an email
            For Each ro In fus.Items
            On Error GoTo here
            If TypeOf ro Is Outlook.MailItem Then
            dah = ro.Body
            'Attempt to match the email's body against your regex pattern
            Set na = wuld.Execute(dah)
            If na.Count > 0 Then
            'Print the result to the Immediate Window (View -> Immediate Window) if there's a match
            Debug.Print na.Item(0).SubMatches(0)
            End If
            End If
            here:
            On Error GoTo 0
            Next
            End Sub


          5. Run it (default hotkey: F5)


          6. Watch your Immediate Window.







          share|improve this answer
















          1. In Outlook, go to Options, Customize Ribbon, and check the box next to "Developer" in the right-hand pane to enable the Developer options in the Ribbon.


          2. On the Ribbon, click Developer, then Visual Basic.


          3. Expand "Project1" and double-click on "ThisOutlookSession".



          4. Paste in this code:





            Sub dragonborn()
            'Declare variables
            Dim fus As Object, ro As Object, dah As String, wuld As RegExp, na As MatchCollection
            'Set up the regular expression defining what you want to look for
            Set wuld = New RegExp
            wuld.Pattern = "HTTP_REFERER]s*=>s*(.+)"
            'Get your "Inbox" mailbox folder for the current open account
            Set fus = GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
            'Loop through each item in Inbox that's an email
            For Each ro In fus.Items
            On Error GoTo here
            If TypeOf ro Is Outlook.MailItem Then
            dah = ro.Body
            'Attempt to match the email's body against your regex pattern
            Set na = wuld.Execute(dah)
            If na.Count > 0 Then
            'Print the result to the Immediate Window (View -> Immediate Window) if there's a match
            Debug.Print na.Item(0).SubMatches(0)
            End If
            End If
            here:
            On Error GoTo 0
            Next
            End Sub


          5. Run it (default hotkey: F5)


          6. Watch your Immediate Window.








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 21 '16 at 20:19









          3498DB

          15.9k114862




          15.9k114862










          answered Nov 21 '16 at 19:11









          allquixoticallquixotic

          30.9k696130




          30.9k696130













          • What was the purpose of the edit @Gareth ? I don't see any difference whatsoever in the post. Can you please explain? I'm not offended, just confused.

            – allquixotic
            Nov 21 '16 at 21:14











          • Just a minor edit to align the code with step 4.

            – 3498DB
            Nov 21 '16 at 21:34



















          • What was the purpose of the edit @Gareth ? I don't see any difference whatsoever in the post. Can you please explain? I'm not offended, just confused.

            – allquixotic
            Nov 21 '16 at 21:14











          • Just a minor edit to align the code with step 4.

            – 3498DB
            Nov 21 '16 at 21:34

















          What was the purpose of the edit @Gareth ? I don't see any difference whatsoever in the post. Can you please explain? I'm not offended, just confused.

          – allquixotic
          Nov 21 '16 at 21:14





          What was the purpose of the edit @Gareth ? I don't see any difference whatsoever in the post. Can you please explain? I'm not offended, just confused.

          – allquixotic
          Nov 21 '16 at 21:14













          Just a minor edit to align the code with step 4.

          – 3498DB
          Nov 21 '16 at 21:34





          Just a minor edit to align the code with step 4.

          – 3498DB
          Nov 21 '16 at 21:34


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1148227%2fis-it-possible-to-yank-a-snippet-of-text-from-multiple-emails%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          If I really need a card on my start hand, how many mulligans make sense? [duplicate]

          Alcedinidae

          Can an atomic nucleus contain both particles and antiparticles? [duplicate]