Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

E-mail Access 1

Status
Not open for further replies.
Mar 12, 2003
678
US
Has anyone found a way to keep the Microsoft Outlook e-mail access window from popping up when trying to send an e-mail through Integration Manager. Microsoft says that Windows Xp Sp1 sets the security and they do not know how to bpass it.
 
Don't use Outlook. Use SMTP (document I found from Microsoft and it works like a dream). This script is what I have on the Document Error:

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Integration Error"
objMessage.Sender = "email address"
objMessage.To = "email address"
objMessage.TextBody = "Error in integration: Name of Integration" & VbCrLf & VbCrLf
objMessage.TextBody =objMessage.TextBody & "Batch ID: " & SourceFields("Batch")
objMessage.TextBody =objMessage.TextBody & VbCrLf &"Document Number: " & SourceFields("DocNo")
objMessage.TextBody =objMessage.TextBody & VbCrLf & "Customer ID: " & SourceFields("CustomerID")
objMessage.TextBody =objMessage.TextBody & VbCrLf & "Date of Integration: " & Date()
objMessage.TextBody =objMessage.TextBody & VbCrLf & "Time Error Occurred: " & Time()

'==This section provides the configuration information for the remote SMTP server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
(" = 2

'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
(" = "input your smtp server here"

'Server port (typically 25)
objMessage.Configuration.Fields.Item _
(" = 25

objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==

objMessage.Send
 
Forgive me for being stupid here, but could you copy an exact script that you have written. I am not very profocient in scripting so i have a hard time interpreting. Thanks
 
If you paste the script I have, just edit the following:

- "email address" with your email address
- "input your smtp server here" put your smtp server from your isp (eg. smtp.microsoft.com)


That's all you need to change and it should work.
 
I've never included an attachment, but I know you'll need to modify the integration to use Level=Document and Storage Type=File (under logs tab), then there is a vb script that will attach that. I believe you can only add the attachment to the "After Integration" The script I included was to email a person after each error.
 
This is the script that I need to e-mail along with an attachment, but this only accounts for a static prenamed file as an attachment...does anyone know how to convert it to look at the daily integration log file that changes its name after every integration. The script that comes with Intergration Manager does this but that code does not work with this code.


SMTPServer = "mbhqex07"

Set objEmail = CreateObject("CDO.Message")

objEmail.From = "kevin.lewis@burroughs-chapin.com"
objEmail.To = "kevin.lewis@burroughs-chapin.com"
objEmail.Subject = "TSW Next Integration Failed for" & " " & Date-1
objEmail.Textbody = "Please click the attached link to view the TSW Next Integration Error File"
objEmail.AddAttachment "C:\Scripts\Output.txt"


objEmail.Configuration.Fields.Item _
(" = 2
objEmail.Configuration.Fields.Item _
(" = SMTPServer
objEmail.Configuration.Fields.Item _
(" = 25
objEmail.Configuration.Fields.Update

objEmail.Send
 
You could use the FileSystemObject and vbScript to iterate over the files and find the newest one of your type. If you figure it out post your code. I'll be doing the same thing in a week or so or sooner if I have the time.

Later
TallOne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top