﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 Integration Services  / SMTPClient question / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 18 Jun 2013 01:11:56 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SMTPClient question</title><link>http://www.sqlservercentral.com/Forums/Topic1384683-148-1.aspx</link><description>Doh, yeah I missed that part when reading your post, my bad, sorry on that.Could you not make use of using DBMail instead if your passing over the results of a query via an execute SQL task instead of creating a script task to do it?</description><pubDate>Thu, 15 Nov 2012 02:11:24 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>RE: SMTPClient question</title><link>http://www.sqlservercentral.com/Forums/Topic1384683-148-1.aspx</link><description>The server is Exchange. Anti-virus is not an issue.As far as IP addresses go, wouldn't I have the same issue running the Send Email task (which works) on the same server??</description><pubDate>Wed, 14 Nov 2012 09:30:16 GMT</pubDate><dc:creator>terry_stjean</dc:creator></item><item><title>RE: SMTPClient question</title><link>http://www.sqlservercentral.com/Forums/Topic1384683-148-1.aspx</link><description>What type of mail server do you use for SMTP?  If its Exchange and you use the mail relay functionaity you need to ensure that you allow the IP address of the server where the mail is being sent from is allow to connect and send via the mail relay admin GUI, there are two places you need to add the IP.  Then also check that you dont have some sort of antivirus issue going on where it blocks mass mail worms, just to be on the safe side as I know from past experiences we had issues with McAfee stopping the mail services of SQL from sending and needed to be over-ridden by en ePO policy change.</description><pubDate>Wed, 14 Nov 2012 08:57:23 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>SMTPClient question</title><link>http://www.sqlservercentral.com/Forums/Topic1384683-148-1.aspx</link><description>I have a package using the Send Email Task.On the SMTP connection, I have the smtp server specified and the Use Windows Authentication checked and the Enable Secure Sockets Layer unchecked.Now, I want to send an email that has some data from a table embedded in the body.So, I have added a Script Task with the following code:            Dim myHtmlMessage As MailMessage            Dim mySmtpClient As SmtpClient            myHtmlMessage = New MailMessage("[i]FromEmailaddress[/i]", "[i]ToEmailAddress[/i]", "Test", Msg)            mySmtpClient = New SmtpClient("[i]smtp.server[/i]")            mySmtpClient.Credentials = CredentialCache.DefaultNetworkCredentials            myHtmlMessage.IsBodyHtml = True            Try                mySmtpClient.Send(myHtmlMessage)            Catch ex As Exception                MsgBox(ex.Message.ToString)                Dts.TaskResult = Dts.Results.Failure            End TryThe FromEmail and ToEmail are my own network email and the SMTPClient is my companies SMTP server, which is the same entry I had in the SMTP Connection Manager for the Send Email Task.When I run the code, I don't get any errors but I never receive the email.I'm trying to figure out why the Send Email Task works but this code does not.Any help would be great.</description><pubDate>Wed, 14 Nov 2012 08:42:10 GMT</pubDate><dc:creator>terry_stjean</dc:creator></item></channel></rss>