Click here to Skip to main content

ASP.NET

   

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
QuestionHow to develop ASP.NET 2.0 Application using Provider Design Pattern PinmemberQayeum18:04 29 Oct '06  
QuestionHow to add an "ENTER" into string ? Pinmembercheeken2u17:09 29 Oct '06  
AnswerRe: How to add an "ENTER" into string ? PinmemberGuffa19:09 29 Oct '06  
GeneralRe: How to add an "ENTER" into string ? [modified] Pinmembersanjivji1:50 30 Oct '06  
AnswerRe: How to add an "ENTER" into string ? PinmemberAndrei_KS20:43 29 Oct '06  
AnswerRe: How to add an "ENTER" into string ? Pinmembercheeken2u21:34 29 Oct '06  
QuestionSystem.Net.Mail and Web.config - Specifying multiple SMTP servers PinmemberSunday Ironfoot15:01 29 Oct '06  
Hi,
 
I know I can specify an SMTP server in the web.config file in ASP.NET 2.0 like this
 
<system.net>
      <mailSettings>
         <smtp deliveryMethod="Network">
            <network host="mail.domain.com" port="25" userName="username" password="password" />
         </smtp>
      </mailSettings>
</system.net>
 
My question is it possible to set multiple SMTP servers and programmatically select which one I want to use? I may want to send mail from different addresses for instance and my mail server requires my username to be username@domain.com, so if I wanted to send mail from different addresses I would need to set the web.config file like so...
 
<system.net>
      <mailSettings>
         <smtp deliveryMethod="Network">
            <network host="mail.domain.com" port="25" userName="email1@domain.com" password="password1" />
         </smtp>
         <smtp deliveryMethod="Network">
            <network host="mail.domain.com" port="25" userName="email2@domain.com" password="password2" />
         </smtp>
      </mailSettings>
</system.net>
 
Thing is it won't let me do this because the <smtp> element can't be repeated. Any ideas? Cheers!
 
Sunday Ironfoot
Questionmultiple sesson Pinmemberdhatchu14:19 29 Oct '06  
Questionquestion about web.config in asp.net 2.0 Pinmemberabstar13:37 29 Oct '06  
AnswerRe: question about web.config in asp.net 2.0 PinmemberAkhilesh Yadav23:10 29 Oct '06  
QuestionCall Postbach PinmemberMHASSANF5:25 29 Oct '06  
AnswerRe: Call Postbach PinmemberGuffa6:30 29 Oct '06  
QuestionGridview control Pinmemberdalbhidebipin3:52 29 Oct '06  
QuestionAnnotation Pinmembersribachana2:14 29 Oct '06  
GeneralRe: Annotation PinmemberGuffa5:07 29 Oct '06  
GeneralRe: Annotation Pinmembersribachana18:15 29 Oct '06  
QuestionI am so tired....and I have no method to resolve the question by myself Pinmemberqiangv22:57 28 Oct '06  
AnswerRe: I am so tired....and I have no method to resolve the question by myself Pinmemberqiangv23:02 28 Oct '06  
QuestionBubbleEvent [modified] Pinmembergreekius@hotmail.com21:26 28 Oct '06  
QuestionBased on frames Pinmembersribachana21:21 28 Oct '06  
QuestionBased on Javascript Pinmembersribachana20:18 28 Oct '06  
AnswerRe: Based on Javascript PinmemberTamimi - Code20:25 28 Oct '06  
QuestionNeeed HELP PinmemberTazzT11:18 28 Oct '06  
AnswerRe: Useless subject PinmemberGuffa11:56 28 Oct '06  
GeneralRe: Useless subject PinmemberJerry Hammond16:21 28 Oct '06  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.5.120529.1 | Last Updated 1 Jun 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid