Produced by Araxis Merge on 4/12/2018 10:18:34 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | MSSRe Build 4.zip\Applications\VACCR_CRS\VACCR | SendEmail.vbs | Tue Apr 10 19:45:41 2018 UTC |
| 2 | MSSRe Build 4.zip\Applications\VACCR_CRS\VACCR | SendEmail.vbs | Thu Apr 12 12:00:12 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 216 |
| Changed | 1 | 8 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | Option Exp licit | |
| 2 | ||
| 3 | 'SCRIPT PA RAMETERS | |
| 4 | 'NOTE: Th is script expects th at the par ent script also incl udes Globa lParms.vbs | |
| 5 | ' wher e database parameter s are defi ned | |
| 6 | 'Const con stExchange Server=" DNS " | |
| 7 | Const cons tExchangeS erver=" DNS " 'This se tting will allow sen ding e-mai ls outside VA | |
| 8 | Const cons tSender=" PII " 'Acco unt used t o send ema ils | |
| 9 | Const cons tServerPor t= PORT | |
| 10 | ||
| 11 | Dim arrRec ipients | |
| 12 | ||
| 13 | Re Dim arrRec ipients(2) | |
| 14 | ar rRecipient s(0) = "ZP Goldman@sb cglobal.ne t" | |
| 15 | ar rRecipient s(1) = "ZG oldman@har ris.com" | |
| 16 | ar rRecipient s(2) = "Zo ya.Goldman @gmail.com " | |
| 17 | ||
| 18 | Ms gbox fnSe ndEmail(ar rRecipient s, "Test S ubject", " test mssg" , "") | |
| 19 | ||
| 20 | Function f nSendEmail (p_arrReci pients, p_ sSubject, p_sMsg, p_ arrAttachm ents) | |
| 21 | '********* ********** ********** ********** ********** ********** ********** | |
| 22 | ' Purpose : Sends an e-mail | |
| 23 | ' Paramete rs: p_ar rRecipient s - array of email a ddresses o f email re cipients | |
| 24 | ' p_sSubje ct - Subj ect of the email | |
| 25 | ' p_sMsg - Text that shou ld be sent | |
| 26 | ' p_arrAtt achments - An array of attachment file name s | |
| 27 | ' or "" if no attach ments. | |
| 28 | ' If an at tachment c annot be f ound, it w ill | |
| 29 | ' be liste d in the b ody of the e-mail | |
| 30 | ' Returns: sRes ult - Empty stri ng on succ ess, | |
| 31 | ' |-delimite d string c ontaining the error code | |
| 32 | ' and error descriptio n on failu re. | |
| 33 | ' Revision History: | |
| 34 | ' 07/19/11 ZPG Origin al creatio n | |
| 35 | '********* ********** ********** ********** ********** ********** ********** | |
| 36 | ||
| 37 | 'C onstants - messaging | |
| 38 | Co nst cdoSen dUsingPick up = 1 | |
| 39 | Co nst cdoSen dUsingPort = 2 | |
| 40 | Co nst cdoAno nymous = 0 | |
| 41 | ||
| 42 | Di m l_objMes sage | |
| 43 | Di m l_iCount | |
| 44 | Di m l_sRecip ients | |
| 45 | Di m l_iNumbe rOfAttachm ents | |
| 46 | Di m l_sMissi ngAttachme nts | |
| 47 | Di m l_iMissi ngAttachme nts | |
| 48 | Di m l_objFSO | |
| 49 | ||
| 50 | RE M On Error Resume Ne xt | |
| 51 | ||
| 52 | 'G et the lis t of recip ients | |
| 53 | Fo r l_iCount = LBound( p_arrRecip ients) to UBound(p_a rrRecipien ts) | |
| 54 | l_sR ecipients = l_sRecip ients & "; " & p_arr Recipients (l_iCount) | |
| 55 | Ne xt | |
| 56 | l_ sRecipient s = Right( l_sRecipie nts, Len(l _sRecipien ts)-2) | |
| 57 | If Trim(l_sR ecipients) = "" Then | |
| 58 | fnSe ndEmail = "0" & "|" & "No emai l recipien ts specifi ed." | |
| 59 | El se | |
| 60 | 'Cre ate a Mess age object | |
| 61 | Set l_objMessa ge = Creat eObject("C DO.Message ") | |
| 62 | ||
| 63 | l_ob jMessage.S ubject = p _sSubject | |
| 64 | l_ob jMessage.F rom = cons tSender | |
| 65 | l_ob jMessage.T o = l_sRec ipients | |
| 66 | ||
| 67 | 'Add attachmen ts | |
| 68 | If N ot p_arrAt tachments = "" And I sArray(p_a rrAttachme nts) Then | |
| 69 | Set l_ objFSO = C reateObjec t("Scripti ng.FileSys temObject" ) | |
| 70 | l_iNum berOfAttac hments=UBo und(p_arrA ttachments ) | |
| 71 | For l_ iCount = 0 To l_iNum berOfAttac hments | |
| 72 | If l_obj FSO.FileEx ists(p_arr Attachment s(l_iCount )) Then | |
| 73 | Err. Clear | |
| 74 | l_objMessa ge.AddAtta chment p_a rrAttachme nts(l_iCou nt) | |
| 75 | Else | |
| 76 | l_iMissing Attachment s = l_iMis singAttach ments + 1 | |
| 77 | l_sMissing Attachment s = l_sMis singAttach ments & vb LFCR & p_a rrAttachme nts(l_iCou nt) | |
| 78 | End If | |
| 79 | Next | |
| 80 | ||
| 81 | If l_i MissingAtt achments > 0 Then | |
| 82 | If l_iMi ssingAttac hments > 1 Then | |
| 83 | l_sMissing Attachment s = vbLFCR & vbLFCR & "The fol lowing fil es were no t attached because t hey were n ot found i n the spec ified loca tion:" & l _sMissingA ttachments | |
| 84 | Else | |
| 85 | l_sMissing Attachment s = vbLFCR & vbLFCR & "The fol lowing fil e was not attached b ecause it was not fo und in the specified location: " & l_sMis singAttach ments | |
| 86 | End If | |
| 87 | p_sMsg = p_sMsg & l_sMissing Attachment s | |
| 88 | End If | |
| 89 | End If | |
| 90 | ||
| 91 | l_ob jMessage.T extBody = p_sMsg | |
| 92 | ||
| 93 | 'Set configura tion | |
| 94 | l_ob jMessage.C onfigurati on.Fields( "http://sc hemas.micr osoft.com/ cdo/config uration/se ndusing") = cdoSendU singPort | |
| 95 | l_ob jMessage.C onfigurati on.Fields( "http://sc hemas.micr osoft.com/ cdo/config uration/sm tpserver") = constEx changeServ er | |
| 96 | l_ob jMessage.C onfigurati on.Fields( "http://sc hemas.micr osoft.com/ cdo/config uration/sm tpserverpo rt") = con stServerPo rt | |
| 97 | l_ob jMessage.C onfigurati on.Fields( "http://sc hemas.micr osoft.com/ cdo/config uration/sm tpauthenti cate") = c doAnonymou s | |
| 98 | l_ob jMessage.C onfigurati on.Fields. Update | |
| 99 | ||
| 100 | l_ob jMessage.S end | |
| 101 | If E rr.Number = 0 Then | |
| 102 | fnSend Email = "" | |
| 103 | Else | |
| 104 | fnSend Email = Er r.Number & "|" & "Se nding the e-mail: " & Err.Desc ription | |
| 105 | End If | |
| 106 | En d If | |
| 107 | ||
| 108 | 'C leanup | |
| 109 | Se t l_objMes sage = Not hing | |
| 110 | Se t l_objFSO = Nothing | |
| 111 | ||
| 112 | End Functi on |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.