Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
February 09, 2012, 05:26:51 PM

Pages: [1]   Go Down
  Print  
Author Topic: LP Policy for sending email from ASP forms  (Read 6688 times)
wyngarth
Newbie
*
Offline Offline

Posts: 2


« on: September 07, 2009, 07:42:02 AM »

There have been a few posts over the last several months about using CDOSYS or the more traditional System.Net.Mail classes to send email from ASP.NET forms.  While both seem to work for sending mail to recipients within the given domain, I continue to get "No such user here" exceptions when sending outside my domain.  Any credentials I pass are basically ignored.  It's almost as if LP maintains some policy against ASP forms sending email outside the given domain.  Is this the case?  Is anyone able to send an email to any arbitrary address from a form?

Thanks,

W
Logged
Rockiaraj
Space Explorer
***
Offline Offline

Posts: 7


« Reply #1 on: September 14, 2009, 12:59:49 AM »

hi
yes,
we have 2 domains on we are using the yahoo mail server and another one we using another domain email id and its hosted at another hosting provider...
follow this configure in the web config file.. inside <configuration> section

<system.net>
      <mailSettings>
         <smtp deliveryMethod="Network" from="raj@yourDomain.com">
            <network host="smtp.axishome.com" userName="raj@yourDomain.com" password="XXXXXXX"/>
         </smtp>
      </mailSettings>
   </system.net>

and in your code
 Dim msg As MailMessage = New MailMessage()
            msg.From = New MailAddress("sales@Userdomain.com")
            msg.To.Add(New MailAddress("raj@userdomain.com")
            msg.Subject = "welcome to XXXXXXXXXXX"
            msg.Body = "body"
            msg.IsBodyHtml = True
            msg.Priority = MailPriority.High
            Dim client As New SmtpClient()
            client.Send(msg)
            client = Nothing

THanks and regards
Raj
Logged
wyngarth
Newbie
*
Offline Offline

Posts: 2


« Reply #2 on: September 21, 2009, 07:58:24 PM »

That did the trick.  Even tweaked it to work with my LunarPages email domain.  Thanks.
Logged
joshuab
Newbie
*
Offline Offline

Posts: 1


« Reply #3 on: December 03, 2009, 02:57:55 AM »

Hey thanx man...
It really helped me also.
thanx for posting





hi
yes,
we have 2 domains on we are using the yahoo mail server and another one we using another domain email id and its hosted at another hosting provider...
follow this configure in the web config file.. inside <configuration> section

<system.net>
      <mailSettings>
         <smtp deliveryMethod="Network" from="raj@yourDomain.com">
            <network host="smtp.axishome.com" userName="raj@yourDomain.com" password="XXXXXXX"/>
         </smtp>
      </mailSettings>
   </system.net>

and in your code
 Dim msg As MailMessage = New MailMessage()
            msg.From = New MailAddress("sales@Userdomain.com")
            msg.To.Add(New MailAddress("raj@userdomain.com")
            msg.Subject = "welcome to XXXXXXXXXXX"
            msg.Body = "body"
            msg.IsBodyHtml = True
            msg.Priority = MailPriority.High
            Dim client As New SmtpClient()
            client.Send(msg)
            client = Nothing

THanks and regards
Raj
« Last Edit: December 03, 2009, 05:28:03 AM by Mitch » Logged
Pages: [1]   Go Up
  Print  
 
Jump to: