Click here to Skip to main content
13,050,242 members (98,560 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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
aspnet_regiis -i 14-Dec-12 0:38am
your last statement is the answer...
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I have complete working code in to convert it in C# you can visit[^]

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 = ""
        ' any address where the email will be sending
        Dim toAddress = ("")
        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.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
        Catch generatedExceptionName As Exception
        End Try
    End Sub
End Class
Rate this: bad
Please Sign up or sign in to vote.

Solution 3


Bigrock configuration on your IIS server with SMTP Service and Relay server configuration?
Please check with Bigrock for SMTP server name and port number?


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100