Hi, Is there a way to get Rebex mail to use the smtp settings from the web.config file in the same way as the standard smtpclient does?

I know we need to set the All the examples we've found show the details hardcoded in, or reading the config directly.

Thanks, Christina

asked 06 Jan '11, 23:41

Christina%201's gravatar image

Christina 1
16
accept rate: 0%


Yes, this is possible. Many static methods of Rebex Smtp object accept an instance of SmtpConfiguration class as one of its arguments. If you pass SmtpConfiguration.Default to it, SMTP settings from Web.config will be used:

Smtp.Send(message, SmtpConfiguration.Default);

You can also use SmtpConfiguration.Default to read the SMTP settings from Web.config and supply the values to non-static methods of Smtp object if preferred.

link

answered 07 Jan '11, 11:43

Lukas%20Pokorny's gravatar image

Lukas Pokorny ♦♦
2.4k28
accept rate: 31%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×53
×19

Asked: 06 Jan '11, 23:41

Seen: 768 times

Last updated: 01 Apr '11, 16:22