Domanda Warning before sending email to external address.

  • giovedì 24 maggio 2012 15:42
     
     

    Hi all,

    I need help to modify the VBScript below that will only pop-up a warning when user sending email to external address. Since we are running Exchange 2007 and outlook 2007, Mailtips isn't option for us.

    Private Sub Application_ItemSend _
    (ByVal Item As Object, Cancel As Boolean)
    Dim strMsg As String
    strMsg = "To recipients = " & Item.To & vbCrLf & vbCrLf & _
    "Cc recipients = " & Item.To & vbCrLf & vbCrLf & _
    "Are you sure you want to send this message?"
    If MsgBox(strMsg, vbYesNo + vbQuestion _
    , "SEND CONFIRMATION") = vbNo Then
    Cancel = True
    End If
    End Sub

    Is there away that it will verify that if the recipient is not part of domain (compare to GAL) and pop-up a warning before user allow to send email.

    Thanks for all the help.