Link to home
Start Free TrialLog in
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

ASKER CERTIFIED SOLUTION
Avatar of melmers
melmers
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NELIXINC
NELIXINC

ASKER

Thanks! Sorry I forgot to respond earlier.