Click here to Skip to main content
15,892,298 members
Home / Discussions / ASP.NET
   

ASP.NET

 
JokeRe: Log out in closing Pin
ahmed eldeghedy15-Jan-09 21:21
professionalahmed eldeghedy15-Jan-09 21:21 
QuestionCreating a web page using dynamic data from xml file? Pin
Suj_7815-Jan-09 1:57
Suj_7815-Jan-09 1:57 
AnswerRe: Creating a web page using dynamic data from xml file? Pin
Not Active15-Jan-09 2:03
mentorNot Active15-Jan-09 2:03 
QuestionAdding RequiredFieldValidtors programmatically Pin
meeram39515-Jan-09 0:41
meeram39515-Jan-09 0:41 
AnswerRe: Adding RequiredFieldValidtors programmatically Pin
Abhijit Jana15-Jan-09 1:03
professionalAbhijit Jana15-Jan-09 1:03 
AnswerRe: Adding RequiredFieldValidtors programmatically Pin
SachinKumar M15-Jan-09 1:10
SachinKumar M15-Jan-09 1:10 
QuestionGridview Rowcommand Problem Pin
soniasan14-Jan-09 23:57
soniasan14-Jan-09 23:57 
AnswerRe: Gridview Rowcommand Problem Pin
Rajeesh MP15-Jan-09 1:24
Rajeesh MP15-Jan-09 1:24 
Hi soniasan
TRY this class


Imports System.Net.Mail
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Net
Imports System.Net.Dns
Imports System.Web.UI.Page
Imports System.Math
Imports System.Text.RegularExpressions
Imports System.Data.SqlClient

Public Class MailHelper
    ''' <summary>
    ''' Sends an mail message
    ''' </summary>
    ''' <param name="from">Sender address</param>
    ''' <param name="recepient">Recepient address</param>
    ''' <param name="bcc">Bcc recepient</param>
    ''' <param name="cc">Cc recepient</param>
    ''' <param name="subject">Subject of mail message</param>
    ''' <param name="body">Body of mail message</param>
    Public Sub SendMailMessage(ByVal from As String, ByVal recepient As String, ByVal bcc As String, ByVal cc As String, _
        ByVal subject As String, ByVal body As String)
        ' Instantiate a new instance of MailMessage
        Dim mMailMessage As New MailMessage()

        ' Set the sender address of the mail message
        mMailMessage.From = New MailAddress(from)
        ' Set the recepient address of the mail message
        mMailMessage.To.Add(New MailAddress(recepient))
        ' Check if the bcc value is null or an empty string
        If Not bcc Is Nothing And bcc <> String.Empty Then
            ' Set the Bcc address of the mail message
            mMailMessage.Bcc.Add(New MailAddress(bcc))
        End If
        ' Check if the cc value is null or an empty value
        If Not cc Is Nothing And cc <> String.Empty Then
            ' Set the CC address of the mail message
            mMailMessage.CC.Add(New MailAddress(cc))
        End If
        ' Set the subject of the mail message
        mMailMessage.Subject = subject
        ' Set the body of the mail message
        mMailMessage.Body = body
        ' Secify the format of the body as HTML
        mMailMessage.IsBodyHtml = True
        ' Set the priority of the mail message to normal
        mMailMessage.Priority = MailPriority.Normal
        ' Instantiate a new instance of SmtpClient
        Dim mSmtpClient As New SmtpClient()
   
       
        mSmtpClient.Host = "------"
        mSmtpClient.Port = "---------"
        mSmtpClient.Credentials = New System.Net.NetworkCredential("-----------", "----------")
        ' Send the mail message
        mSmtpClient.Send(mMailMessage)
    End Sub
End Class Use this class


regards
Rajeesh MP
AnswerRe: Gridview Rowcommand Problem Pin
Rajeesh MP15-Jan-09 1:25
Rajeesh MP15-Jan-09 1:25 
QuestionAsp.net application deployment, on Webserver Pin
Hassan Akhtar Ali14-Jan-09 23:55
Hassan Akhtar Ali14-Jan-09 23:55 
AnswerRe: Asp.net application deployment, on Webserver Pin
Rajeesh MP15-Jan-09 1:54
Rajeesh MP15-Jan-09 1:54 
GeneralRe: Asp.net application deployment, on Webserver Pin
Hassan Akhtar Ali15-Jan-09 20:28
Hassan Akhtar Ali15-Jan-09 20:28 
Questionfinding a text from a gridview Pin
sandhya1414-Jan-09 23:33
sandhya1414-Jan-09 23:33 
AnswerRe: finding a text from a gridview Pin
sandhya1415-Jan-09 21:03
sandhya1415-Jan-09 21:03 
Questiondownload problem from Secure Sockets Layer enabled site(https) Pin
DotnetRafi14-Jan-09 23:30
DotnetRafi14-Jan-09 23:30 
QuestionGetting Current website connections through .net Pin
markymark8214-Jan-09 23:26
markymark8214-Jan-09 23:26 
AnswerRe: Getting Current website connections through .net Pin
NeverHeardOfMe15-Jan-09 0:41
NeverHeardOfMe15-Jan-09 0:41 
GeneralRe: Getting Current website connections through .net Pin
markymark8215-Jan-09 0:42
markymark8215-Jan-09 0:42 
QuestionGridview selection Pin
bishwambhar_sen14-Jan-09 23:08
bishwambhar_sen14-Jan-09 23:08 
AnswerRe: Gridview selection Pin
_AK_15-Jan-09 0:01
_AK_15-Jan-09 0:01 
AnswerRe: Gridview selection Pin
Rajeesh MP15-Jan-09 1:57
Rajeesh MP15-Jan-09 1:57 
Questionpage refresh problem Pin
bhavna432114-Jan-09 21:44
bhavna432114-Jan-09 21:44 
AnswerRe: page refresh problem Pin
N a v a n e e t h14-Jan-09 21:54
N a v a n e e t h14-Jan-09 21:54 
GeneralRe: page refresh problem Pin
bhavna432114-Jan-09 21:57
bhavna432114-Jan-09 21:57 
GeneralRe: page refresh problem Pin
N a v a n e e t h14-Jan-09 22:02
N a v a n e e t h14-Jan-09 22:02 

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

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