Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
I have a email function to send mail. It is sending mail in local pc when i run it through vs 2010,
 
But When i host application it is unable to send mail..
 
What could be the possible problem ?
 
I am hosting my application on bigrock server ..and using gmail account to send mail.
 
Is ths problem of port no ? Or i have to discuss with bigrock
Posted 13-Dec-12 18:24pm
Comments
aspnet_regiis -i at 14-Dec-12 0:38am
   
your last statement is the answer...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I have complete working code in vb.net to convert it in C# you can visit http://converter.telerik.com/[^]
 
Imports System.Net.Mail
Imports System.Net
Partial Class _Default
    Inherits System.Web.UI.Page
 
    Protected Sub SendMail()
        ' Gmail Address from where you send the mail
        Dim fromAddress = "user@domain.com"
        ' any address where the email will be sending
        Dim toAddress = ("recevier@domain.com")
 
        Const fromPassword As String = "Password"
        ' Passing the values and make a email formate to display
        Dim subject As String = ("Abccc")
        Dim body As String = "this is body of your email " + vbLf
        ' smtp settings
        Dim smtp = New System.Net.Mail.SmtpClient()
        If True Then
            smtp.Host = "smtp.domainname.net"
            smtp.Port = 25
            smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network
            smtp.Credentials = New NetworkCredential(fromAddress, fromPassword)
            smtp.Timeout = 20000
        End If
        ' Passing values to smtp object
        smtp.Send(fromAddress, toAddress, subject, body)
    End Sub
 

    Protected Sub btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn.Click
        Try
            SendMail()
        Catch generatedExceptionName As Exception
        End Try
    End Sub
   
End Class
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi
 
Bigrock configuration on your IIS server with SMTP Service and Relay server configuration?
Please check with Bigrock for SMTP server name and port number?
 
Regards,
timcyspet
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Shai Vashdi 1,628
1 Tadit Dash 375
2 Manas Bhardwaj 319
3 Sergey Alexandrovich Kryukov 275
4 OriginalGriff 243
0 Sergey Alexandrovich Kryukov 9,530
1 OriginalGriff 5,711
2 Peter Leow 4,320
3 Maciej Los 3,540
4 Abhinav S 3,373


Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid