Avatar of NELIXINC
NELIXINC asked on

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

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

Open in new window

Visual Basic.NET

Avatar of undefined
Last Comment
NELIXINC

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
melmers

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
NELIXINC

Thanks! Sorry I forgot to respond earlier.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy