Email Error - No global profile is configured. Specify a profile name in the @profile_name parameter. RRS feed

  • Question

  • User-1499457942 posted


      I have below code . I am using Sql Database Mail . When i send Test mail it is working . Secondly i want if stored procedure is executed successfully it should reurn value and message displayed . Successfully executed

    protected void Mailing(int Id)
    using (cmd = new SqlCommand("sp_Test", con))
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.AddWithValue("@No", Id);

    Below is the line in Stored procedure

    EXEC msdb.dbo.sp_send_dbmail @recipients=@EMail,

    Saturday, June 30, 2018 5:02 AM

All replies