Results 1 to 2 of 2

Thread: [2005] emailing problems

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2007
    Posts
    56

    Question [2005] emailing problems

    Hi, I have some emailing code in my web application. It has been working and now I have to change it because I kept getting the error of the email not being able to relay or something like that. I got my code to work after I changed it, so I changed ALL my email code in the entire program. Now all of a sudden it's not working. It worked just a minute ago, and now it's not. Here's my code:

    Code:
    Dim msg As String = "Another test. Thank You!" 
                   Dim emp_email As String 
            emp_email = "[email protected]" 
    
     Dim message As New System.Net.Mail.MailMessage("[email protected]", emp_email, "test", msg) 
            message.IsBodyHtml = True 
    
            Dim emailClient As New SmtpClient("dwmail1") 
            emailClient.Host = "dwmail1" 
            'Dim SMTPUserInfo As New System.Net.NetworkCredential("mrequester", "schedule", "DWLAN") 
    
            emailClient.UseDefaultCredentials = False 
            emailClient.Credentials = New Net.NetworkCredential("athorson", "feeco") 
            emailClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis 
    
            Try 
                emailClient.Send(message) 
            Catch ex As Exception 
                MsgBox(ex.ToString) 
            End Try
    I'm really stumped because it just worked and it's not giving me an error or anything. can anyone help me? Thanks!

  2. #2
    Fanatic Member MetalKid's Avatar
    Join Date
    Aug 2005
    Location
    Green Bay, Wisconsin
    Posts
    534

    Re: [2005] emailing problems

    My guess is because you aren't pointing to the right SMTP Host. dwmail1 should probably be something like smtp.dwmail1.com maybe? If that doesn't work, I would try some different delivery methods.
    If your problem is solved, please use the Mark Thread As Resolved under Thread Tools!

    Show Appreciation. Rate Posts!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width