Devicode Technology Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Extract First Name, Last Name and Email address

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Devicode Technology Forum Index -> Response Mailer
View previous topic :: View next topic  
Author Message
devicode
Site Admin


Joined: 05 Mar 2005
Posts: 248

PostPosted: Mon Jan 14, 2008 10:30 pm    Post subject: Extract First Name, Last Name and Email address Reply with quote

How to set up the “Incoming Email Data Extractor” in response mailer pro for these fields?
1. First Name, 2. Last Name, 3. Email

The email body contains:
Name: Shawn Miller
Address: 12 S. 2th Ave
City: Long Beach
Phone: (123) 456-7890
Email: miller@someplace.com
Back to top
View user's profile Send private message Visit poster's website
devicode
Site Admin


Joined: 05 Mar 2005
Posts: 248

PostPosted: Mon Jan 14, 2008 10:50 pm    Post subject: Reply with quote


  • Add 'Extractor Data from incoming Email'
    Field Name : Extracted_Name
    Email Data Source : Message body
    # Start of Data Field'
    For the FROM select 'Specific text'
    For the TEXT enter Name:
    # 'End of Data Field'
    For the TO select 'End of line'

  • Add 'Run Script to modify Extracted Data'
    Field Name : EXT_FirstName
    Start Value : [[Extracted_Name]]
    Enter the following in the VB Script box

Code:
' VBScript
' You can create any number of new Sub Procedures and Functions.

 Sub Main()
' commands start here
   Extracted_Name.value = PCase( Extracted_Name.value)
   EXT_FirstName.value = GetWord( Extracted_Name.value, 0 )
 End Sub

Function GetWord(byVal string, Index)
   Dim Words, c
   If IsNull(string) Then
      GetWord = Null
      Exit Function
   Else
      string = CStr( string )
   End If
   Words = Split( string, " " )
   c = UBound(Words)
   If Index <0  or Index>= c Then
      Index = Cint (c)
   End If
   GetWord = Trim( Words (Index) )
End Function

Function PCase(byVal string)
   Dim Tmp, Word, Tmp1, Tmp2, firstCt, a, sentence, c, i
   If IsNull(string) Then
      PCase = Null
      Exit Function
   Else
      string = CStr( string )
   End If
   a = Split( string, vbCrLf )
   c = UBound(a)
   i = 0
   For each sentence in a
      Tmp = Trim( sentence )
      Tmp = split( sentence, " " )
      For Each Word In Tmp
         Word = Trim( Word )
         Tmp1 = UCase( Left( Word, 1 ) )
         Tmp2 = LCase( Mid(  Word, 2 ) )
         PCase = PCase & Tmp1 & tmp2 & " "
      Next
      PCase = Left( PCase, Len(PCase) - 1 )
      If i = c then
      Else
         PCase = PCase & vbCrLf
      End If
      i = i + 1
   Next
End Function



  • Add 'Run Script to modify Extracted Data'
    Field Name : EXT_LastName
    Start Value : [[Extracted_Name]]
    Enter the following in the VB Script box

Code:
' VBScript
' You can create any number of new Sub Procedures and Functions.

 Sub Main()
' commands start here
   Extracted_Name.value = PCase( Extracted_Name.value)
   EXT_LastName.value = GetWord( Extracted_Name.value, 4 )
 End Sub

Function GetWord(byVal string, Index)
   Dim Words, c
   If IsNull(string) Then
      GetWord = Null
      Exit Function
   Else
      string = CStr( string )
   End If
   Words = Split( string, " " )
   c = UBound(Words)
   If Index <0  or Index>= c Then
      Index = Cint (c)
   End If
   GetWord = Trim( Words (Index) )
End Function

Function PCase(byVal string)
   Dim Tmp, Word, Tmp1, Tmp2, firstCt, a, sentence, c, i
   If IsNull(string) Then
      PCase = Null
      Exit Function
   Else
      string = CStr( string )
   End If
   a = Split( string, vbCrLf )
   c = UBound(a)
   i = 0
   For each sentence in a
      Tmp = Trim( sentence )
      Tmp = split( sentence, " " )
      For Each Word In Tmp
         Word = Trim( Word )
         Tmp1 = UCase( Left( Word, 1 ) )
         Tmp2 = LCase( Mid(  Word, 2 ) )
         PCase = PCase & Tmp1 & tmp2 & " "
      Next
      PCase = Left( PCase, Len(PCase) - 1 )
      If i = c then
      Else
         PCase = PCase & vbCrLf
      End If
      i = i + 1
   Next
End Function



  • Add 'Extractor Data from incoming Email'
    Field Name : Extracted_Email
    Email Data Source : Message body
    # Start of Data Field'
    For the FROM select 'Specific text'
    For the TEXT enter Email:
    # 'End of Data Field'
    For the TO select 'End of line'


You can now use
[[EXT_FirstName]], [[EXT_LastName]], [[Extracted_Email]] in your autorepy emails.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Devicode Technology Forum Index -> Response Mailer All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group