Think I have found that one. Postmaster had the same smtp address for testing that was in the script. Removed the bogus smtp address from postmaster and I think we are running cleaner now.
From: Sam Cayze Sent: Monday, November 16, 2009 10:58 AM To: NT System Admin Issues Subject: RE: blat to many Not sure what would cause that. -------------------------------------------------------------------------------- From: David W. McSpadden [mailto:[email protected]] Sent: Monday, November 16, 2009 9:11 AM To: NT System Admin Issues Subject: Re: blat to many My sender in this is coming out as my internal postmas...@local account how do I change that? From: Sam Cayze Sent: Friday, November 13, 2009 1:06 PM To: NT System Admin Issues Subject: RE: blat to many Here is a script I wrote that reads all the email address in a XLS, and sends to each. Also has a testing mechanism. This one uses CDO, but it could easily be tweaked for Blat. Bulk Email Script.vbs '____________________________________________________________________________ 'A tool used to blast emails to a XLS list of email address 'Uses CDO to talk to Exchange; it inserts the messages into the PickUp directory for Queue. 'Sam Cayze 'Rollouts '____________________________________________________________________________ '**************************************************************************** 'START - USER EDITABLE VARIABLES 'Where is the XLS located? Note, have the emails in Column A. Full Path, Quotes Needed. excelPath = "C:\PATH\File.xls" 'Which row does the data start / is there a header? If no header, 1; if yes, 2. intRow = 2 'From Address. Example: "Joe User <[email protected]>" FromAddress="Joe User <[email protected]>" 'Testing Address TestToAddress="[email protected]" 'Subject Line Subject="Thank you for your response" 'Location of the email template, in HTML format. Use http://tinymce.moxiecode.com/examples/full.php# to create the HTML code. 'Be sure to use the format "file://C:\Path\FileName.html" HTMLPath="file://C:\Path\Email.html" 'END - USER EDITABLE VARIABLES '**************************************************************************** DIM cell Dim currentWorkSheet Dim usedColumnsCount Dim usedRowsCount Dim row Dim column Dim top Dim left Dim Cells Dim curCol Dim curRow Dim countSend Set objExcel = CreateObject("Excel.Application") Set objExcel = CreateObject("Excel.Application") objExcel.DisplayAlerts = 0 objExcel.Workbooks.open excelPath, false, true Set currentWorkSheet = objExcel.ActiveWorkbook.Worksheets(1) usedColumnsCount = currentWorkSheet.UsedRange.Columns.Count usedRowsCount = currentWorkSheet.UsedRange.Rows.Count top = currentWorksheet.UsedRange.Row left = currentWorksheet.UsedRange.Column 'Loop through each row, and read the first 3 lines. Cell = objExcel.Cells(1, 1).Value Cell2 = objExcel.Cells(2, 1).Value Cell3 = objExcel.Cells(3, 1).Value Ret=Msgbox("The spreadsheet @ " & vbCRLF & excelPath & vbCRLF & "Contains " & usedRowsCount & " rows. (Including header, if any.) " & vbCRLF & vbCRLF _ & "First 3 Cells:" & vbCRLF & Cell & vbCRLF & Cell2 & vbCRLF & Cell3 & vbCRLF & vbCRLF & "Do you wish to send?",VBYesNo,"Bulk Emailer") If Ret=6 then countSend = 0 'Loop through each row, and send the email. Do Until objExcel.Cells(intRow,1).Value = "" Cell = objExcel.Cells(intRow, 1).Value intRow = intRow + 1 Set myMail=CreateObject("CDO.Message") myMail.Subject=Subject myMail.From=FromAddress myMail.To=Cell myMail.CreateMHTMLBody HTMLPath myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="10.10.0.20" myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 myMail.Configuration.Fields.Update myMail.Send countSend = countSend + 1 Loop MsgBox countSend & " Email(s) Sent", vbInformation + vbOKOnly, "Bulk Emailer" Else Ret=Msgbox("Do you wish to send a test email to " & TestToAddress & "?",VBYesNo,"Bulk Emailer") If Ret=6 then countSend = 0 Set myMail=CreateObject("CDO.Message") myMail.Subject=Subject myMail.From=FromAddress myMail.To=TestToAddress myMail.CreateMHTMLBody HTMLPath myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="10.10.0.20" myMail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 myMail.Configuration.Fields.Update myMail.Send countSend = countSend + 1 MsgBox countSend & " Email(s) Sent", vbInformation + vbOKOnly, "Bulk Emailer" end if end if objExcel.Quit set myMail=nothing -------------------------------------------------------------------------------- From: David W. McSpadden [mailto:[email protected]] Sent: Friday, November 13, 2009 8:50 AM To: NT System Admin Issues Subject: blat to many How can I take a list of emails and use blat to send to each of them? Is there a batch file anyone has laying around? ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
