Click here to Skip to main content
15,867,308 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Why can't I login to the web even though the User and password are correct ? Pin
Member 245846716-Jan-20 20:23
Member 245846716-Jan-20 20:23 
GeneralRe: Why can't I login to the web even though the User and password are correct ? Pin
Richard Deeming17-Jan-20 0:30
mveRichard Deeming17-Jan-20 0:30 
QuestionHow do you have a DropDownList populated without default selected item? Pin
Member 114033049-Jan-20 6:07
Member 114033049-Jan-20 6:07 
AnswerRe: How do you have a DropDownList populated without default selected item? Pin
ZurdoDev9-Jan-20 6:40
professionalZurdoDev9-Jan-20 6:40 
GeneralRe: How do you have a DropDownList populated without default selected item? Pin
Member 114033049-Jan-20 6:56
Member 114033049-Jan-20 6:56 
GeneralRe: How do you have a DropDownList populated without default selected item? Pin
ZurdoDev9-Jan-20 7:59
professionalZurdoDev9-Jan-20 7:59 
GeneralRe: How do you have a DropDownList populated without default selected item? Pin
Mycroft Holmes9-Jan-20 10:14
professionalMycroft Holmes9-Jan-20 10:14 
QuestionHow to I make EmailButton_Click work? Pin
Member 114033048-Jan-20 4:59
Member 114033048-Jan-20 4:59 
My code for EmailButton_Click is not working. I am getting an error System.Net.Mail.SmtpException: 'SSL must not be enabled for pickup-directory delivery methods.' so email is not sent.

How can I fix this?

Here is the code
C#
protected void EmailButton_Click(object sender, EventArgs e)
        {
            //get selected email
            
            string requestor = RequestorDropDownList.SelectedValue.ToString();
            //string message = "The following records have been prepped for processing.  Valid cases will be processed.{0}{1}{2}";
            string message = "The following records have been prepped for processing.  Valid cases will be processed.";
            if (requestor.Length > 0)
                message = string.Format(message);
            using (MailMessage mailMessage = new MailMessage())
                {
                    mailMessage.From = new MailAddress("NoReply_FTA@courts.state.mn.us");
                   //MailAddress to = new MailAddress(requestorEmail);
                    MailAddress to = new MailAddress("okaymy1112@gmail.com");
                    mailMessage.To.Add(to);
                                      
                    string ccEmailAddress = "okaymy1112@mail.com";
                    if (ccEmailAddress.Length > 0)
                    {
                        MailAddress ccto = new MailAddress(ccEmailAddress);
                        mailMessage.CC.Add(ccto);
                    }

                    mailMessage.Subject = "FTA Case Reset Notice";
                    mailMessage.Body = message;
                    mailMessage.IsBodyHtml = true;

                    SmtpClient smtpClient = new SmtpClient();
                    smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
                    smtpClient.DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory;
                    smtpClient.PickupDirectoryLocation = @"c:\smtp";
                    smtpClient.EnableSsl = true;
                    smtpClient.UseDefaultCredentials = true;
                    smtpClient.Timeout = 60000;

                    smtpClient.Send(mailMessage);//Error occurs on this line

                    ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('An email has been sent to '" + requestorName + "');", true);
        }

AnswerRe: How to I make EmailButton_Click work? Pin
ZurdoDev8-Jan-20 5:21
professionalZurdoDev8-Jan-20 5:21 
AnswerRe: How to I make EmailButton_Click work? Pin
F-ES Sitecore8-Jan-20 5:45
professionalF-ES Sitecore8-Jan-20 5:45 
GeneralRe: How to I make EmailButton_Click work? Pin
Member 114033048-Jan-20 11:16
Member 114033048-Jan-20 11:16 
GeneralRe: How to I make EmailButton_Click work? Pin
F-ES Sitecore8-Jan-20 22:11
professionalF-ES Sitecore8-Jan-20 22:11 
QuestionHow do I make my GetCasesButton_Click work? Pin
Member 114033048-Jan-20 4:46
Member 114033048-Jan-20 4:46 
AnswerRe: How do I make my GetCasesButton_Click work? Pin
ZurdoDev8-Jan-20 5:19
professionalZurdoDev8-Jan-20 5:19 
GeneralRe: How do I make my GetCasesButton_Click work? Pin
Member 114033048-Jan-20 7:56
Member 114033048-Jan-20 7:56 
QuestionHow do I make my GetCasesButton_Click work? Pin
Member 114033048-Jan-20 4:33
Member 114033048-Jan-20 4:33 
AnswerRe: How do I make my GetCasesButton_Click work? Pin
ZurdoDev8-Jan-20 5:18
professionalZurdoDev8-Jan-20 5:18 
QuestionText with Audio Pin
Member 104440587-Jan-20 21:19
Member 104440587-Jan-20 21:19 
AnswerRe: Text with Audio Pin
ZurdoDev8-Jan-20 0:57
professionalZurdoDev8-Jan-20 0:57 
GeneralRe: Text with Audio Pin
Member 104440588-Jan-20 19:47
Member 104440588-Jan-20 19:47 
QuestionName of the software that can package websites to install on smartphones: android and iphone ? Pin
Member 24584677-Jan-20 17:34
Member 24584677-Jan-20 17:34 
GeneralRe: Name of the software that can package websites to install on smartphones: android and iphone ? Pin
Richard MacCutchan7-Jan-20 21:21
mveRichard MacCutchan7-Jan-20 21:21 
GeneralRe: Name of the software that can package websites to install on smartphones: android and iphone ? Pin
Member 24584679-Jan-20 19:44
Member 24584679-Jan-20 19:44 
GeneralRe: Name of the software that can package websites to install on smartphones: android and iphone ? Pin
Richard MacCutchan9-Jan-20 23:08
mveRichard MacCutchan9-Jan-20 23:08 
QuestionScrape with htmlagilityapck question Pin
Member 17532506-Jan-20 12:10
Member 17532506-Jan-20 12:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.