0

Could you please help me understand how to send a workflow email, when user submits a task form. The process is to automate the sending of email to "BI Owners", when user fills out a form and once he/she clicks "save"/"submit", then the email should be sent out.

Thanks in advance.

4

1 回答 1

0

您需要了解 Worfklow 的配置吗?在这种情况下,请检查:

在工作流中发送电子邮件

你如何建立你的表格?它是一个aspx,一个webpart,某种魔法?

嗯,这很重要,因为你有不同的方式来启动你的工作流程,这取决于它。

如果您拥有所有表单的控制权,那么这就是我的发送电子邮件类:

  protected void sendEmail()
    {
        try
        {
                string mailTo = dudeToSendMail;
                MailMessage message = new MailMessage();
                message.From = new MailAddress(mailSender);
                message.To.Add(new MailAddress(mailTo));
                message.Subject = mailSubject;
                message.Body = buildMail();  // hey, dude, build up your mail here!
                message.IsBodyHtml = true;
                SmtpClient client = new SmtpClient();
                client.Send(message);
        }
        catch (System.Exception)
        {
            throw;
        }



    }

希望能帮助到你。

于 2012-05-19T00:50:30.740 回答