Traitée Send mail to customers

  • Friday, February 08, 2013 7:26 AM
     
     

    Hi

    I need to send mail to customer ..

    I'm totally blank how can i achieve this.

    actaully i have a table in which i have two thing

    Email id

    Key

    now on based on these i need to send these key on based on corresponding email ID.

    kindly help .

    thanks

    With regards

    BI_Group

All Replies

  • Friday, February 08, 2013 7:53 AM
     
     Proposed

    HI BI_Group ,

    What you can do is use send mail task inside the Foreach loop container and then add the key and mail id into a variable and configure in Send mail using Expressions, this is usefull when you need to send different body message to each user,

    You can also concatenate all the mail ID into single by using SQL Query and then getting the value in the variable inside the package and then using the variable in Send mail task, this is for sending bulk Email with same subject and same body message.

    Regards

    Naveen

    • Proposed As Answer by Sudeep Raj Friday, February 08, 2013 12:34 PM
    •  
  • Friday, February 08, 2013 9:27 AM
     
     

    As Naveen suggested use Send mail task in For each loop and configure the send mail task as follows :

    http://www.mssqltips.com/sqlservertip/1731/sending-email-from-sql-server-integration-services-ssis/

    for DB Email refer this Sudeep's bolg

    http://beyondrelational.com/modules/2/blogs/106/posts/11108/ssis-using-db-mail-to-send-html-format-mail.aspx

    Please mark it as helpful if it helps

    Thanks

    Sumit

  • Friday, February 08, 2013 10:16 AM
     
     

    I get this error using EMail Task

    [Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail.  System.Net.WebException: The remote name could not be resolved: 'smtpserver'".

    Actually i have not used this task before .. I need to send mail to client using it.

    How can i configure SMTP Connection?

    Please help ..

    what are the requirent from SMTP server connection ..

    actaully i know what is SMTP server IP and i just past in connection .

    now i need to know what is more requiremnt to SMTP connection successful .what point should I remember before creating SMTP connection.

    like in one forum it is written before using SMTP connection make sure

    user in the profile should have access to the SMTP Server.

    so like what points should i consider before creating SMTP connection.

  • Friday, February 08, 2013 10:43 AM
     
     Answered

    Thats true, I mean if you are running in your BIDS that you user account should have access to the SMTP server you are accessing or when you are running from job that account should have access to the SMTP Server.

    You can't access any SMTP server freely. I mean if you want to access the SMTP server lets say your organisation is having a SMTP server(mail account SMTP Server) its not mandatory that you have access to that , you need to ask for the access for specific user.

    Please mark it as helpful if it helps.

    Thanks

    Sumit

     

  • Friday, February 08, 2013 12:36 PM
     
     
    Get in touch with you mail admin in IT team. They will let you knwo the SMTP server details. Also check if they have provided you the access to SMTP server.

    My Blog    |      Ask Me     |      SSIS Basics     

  • Monday, February 11, 2013 8:54 AM
     
     

    Hi,

    If sending the mail from a particular ID is not necessary, you can try this:

    public void Main()
            {
                MailMessage msg = new MailMessage("Your_ID@live.com", "Recipient_ID@live.com", "Subject", "Content");
                SmtpClient client = new SmtpClient("smtp.live.com", 25);
                client.EnableSsl = true;
                client.DeliveryMethod = SmtpDeliveryMethod.Network;
                client.Credentials = new NetworkCredential("Your_ID@live.com", "Password");

                client.Send(msg);

                Dts.TaskResult = (int)ScriptResults.Success;

    }

    These are the settings for a Windows Live account.

    If you want to send it out from your network and if your organization uses the Exchange Server, then you can find the smtp server in your Outlooks Account Settings section.

    I hope this is helpful

    Regards,

    Saket Kale