troubleshooting Question

How do you configure the smtpserver port for system.web.mail in vb.net 1.1 on Windows 2005 server?

Avatar of NELIXINC
NELIXINC asked on
Visual Basic.NET
2 Comments1 Solution1161 ViewsLast Modified:
I need to change the smtpserverport from 25 to 10045 for a client.
Using system.web.mail, developing in VS 2003 / vb.net 1.1.
Hosted on Windows server 2005.

It has always worked until I added this line:
msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "10045")

... and it returns a 'Fields update failed'.

Is there a better way to set the port?
Thanks


System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x800A0EA5): Fields update failed. For further information, examine the Status property of individual field objects.
  --- End of inner exception stack trace ---
  at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
  at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters)
  at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
  at System.Web.Mail.SmtpMail.Send(MailMessage message)
  at SCv1.EmailBroadcast.SendEmail(Object Recipient, Object thisAttachment) in X:\...Email\EmailBroadcast.aspx.vb:line 656
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros