Lunarpages Web Hosting Forum

Author Topic: LP Policy for sending email from ASP forms  (Read 9921 times)

Offline wyngarth

  • Newbie
  • *
  • Posts: 2
LP Policy for sending email from ASP forms
« on: September 07, 2009, 06: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

Offline Rockiaraj

  • Space Explorer
  • ***
  • Posts: 7
Re: LP Policy for sending email from ASP forms
« Reply #1 on: September 13, 2009, 11:59:49 PM »
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

Offline wyngarth

  • Newbie
  • *
  • Posts: 2
Re: LP Policy for sending email from ASP forms
« Reply #2 on: September 21, 2009, 06:58:24 PM »
That did the trick.  Even tweaked it to work with my LunarPages email domain.  Thanks.

Offline joshuab

  • Newbie
  • *
  • Posts: 1
Re: LP Policy for sending email from ASP forms
« 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 »