Beat-Down Posted September 19, 2003 Posted September 19, 2003 I am running XP with an exchange server. I am trying to create an app that has email functionality. My problem is that I can send all the email I want within my domain but anything that I try to send outside the domain never gets sent. I dont get any error or faults. The mail just never shows up. Can anyone help me with this please? Thanks Here is my code Dim eml As New System.Web.Mail.MailMessage() System.Web.Mail.SmtpMail.SmtpServer = lblsmtp.Text With eml .To = txtemailaddress.text .Subject = txtSubject.Text .Cc = lblFrom.Text .Body = txtMessage.Text .From = lblFrom.Text Select Case cboPriority.Text Case "Low" .Priority = MailPriority.Low Case "Normal" .Priority = MailPriority.Normal Case "High" .Priority = MailPriority.High End Select .BodyFormat = MailFormat.Text End With If MessageBox.Show("Send email?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then Try System.Web.Mail.SmtpMail.Send(eml) MessageBox.Show("The email has been successfully sent.", "Email", MessageBoxButtons.OK, MessageBoxIcon.Information) Me.Close() Catch ex As Exception MessageBox.Show("The following error occured while sending email:" & vbCrLf & ex.Message, "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error) End Try End If Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.