hi frinendz,
how to create the mail project.
i am senting the mail throw .net (c# asp)
12 1829
hi frinendz,
how to create the mail project.
i am senting the mail throw .net (c# asp)
try to search the web (google, yahoo) fro the answer
type in "how to email with c#.net and asp.net"
hope ull find answers there...
enjoy coding,
vinci
Please be more specific. What are the requirements? What have you tred so far? Did you receive any error messages?
Please be more specific. What are the requirements? What have you tred so far? Did you receive any error messages?
i am didn't write the code .how to start the C#asp.net coding.
mailing system for example i will sent the mail throw smtp via .how to write the code
pls reply me.......
Hi,
Have you seen this .NET Article on how to send an email?
It is strongly recommended that you actually try to create the application before asking questions. Vague questions are very hard to answer.
If you start by trying to send an email, as described by that article, and then get back to us with more specific questions on the problems you're encountering we will be able to better help you.
(I realize that the article is written for VB.NET applications. But you should be able to easily use it in your C# application with a few syntactical changes. )
-Frinny
hi friends ,
i am creating mailing system using the code
Imports System.Net.Mail.MailAddress
'Imports System.Web.Mail.MailFormat
'Imports System.Web.Mail.MailMessage
Imports System.Net.Mail.MailMessage
Imports System.Net.Mail.SmtpClient
Imports System.Net.Mail.MailPriority
Imports System.Net.Mail.Attachment
Partial Class _Default
Inherits System.Web.UI.Page
Dim sTo As String, sFrom As String, sSubject As String, sBody As String
Dim sAttach As String, sCc As String, sBcc As String, sBodyEncoding As String
Dim sBodyFormat As String, sMailServer As String, sPriority As String
Dim sUrlContentBase As String, sUrlContentLocation As String
Dim iLoop1 As Integer
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Encoding As New System.Net.Mail.MailMessage
If Not IsPostBack Then
lblMsg1.Text = ""
txtTo.Text = "palanivels@rediffmail.com.com"
txtFrom.Text = "marsha@contoso.com"
txtCc.Text = "fred@contoso.com"
txtBcc.Text = "wilma@contoso.com"
txtSubject.Text = "Hello"
txtBody.Text = "This is a test message."
'txtAttach.Text = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg," _
' & "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Winter.jpg"
' txtBodyEncoding.Text = Encoding.ASCII.EncodingName
txtBodyFormat.Text = "HTML"
txtPriority.Text = "Normal"
txtUrlContentBase.Text = "http://www.contoso.com/images"
txtUrlContentLocation.Text = "http://www.contoso.com/images"
' Name of relay mail server in your domain.
txtMailServer.Text = "smarthost" '
End If
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim sTo As String, sFrom As String, sSubject As String, sBody As String
Dim sAttach As String, sCc As String, sBcc As String, sBodyEncoding As String
Dim sBodyFormat As String, sMailServer As String, sPriority As String
Dim sUrlContentBase As String, sUrlContentLocation As String
' Dim iLoop1 As Integer
sTo = Trim(txtTo.Text)
sFrom = Trim(txtFrom.Text)
sSubject = Trim(txtSubject.Text)
sBody = Trim(txtBody.Text)
sAttach = Trim(txtAttach.Text)
sCc = Trim(txtCc.Text)
sBcc = Trim(txtBcc.Text)
sBodyFormat = Trim(txtBodyFormat.Text)
sBodyEncoding = Trim(txtBodyEncoding.Text)
sPriority = Trim(txtPriority.Text)
sUrlContentBase = Trim(txtUrlContentBase.Text)
sUrlContentLocation = Trim(txtUrlContentLocation.Text)
sMailServer = Trim(txtMailServer.Text)
Dim MyMail As Mail.MailMessage = New Mail.MailMessage
MyMail.From = sFrom
MyMail.To = sTo
MyMail.Subject = sSubject
MyMail.Body = sBody
MyMail.Cc = sCc
MyMail.Bcc = sBcc
MyMail.UrlContentBase = sUrlContentBase
MyMail.UrlContentLocation = sUrlContentLocation
Select Case txtBodyEncoding.Text
Case Encoding.UTF7.EncodingName : MyMail.BodyEncoding = Encoding.UTF7
Case Encoding.UTF8.EncodingName : MyMail.BodyEncoding = Encoding.UTF8
Case Else : MyMail.BodyEncoding = Encoding.ASCII
End Select
Select Case UCase(sBodyFormat)
Case "HTML" : MyMail.BodyFormat = Mail.MailFormat.Html
Case Else : MyMail.BodyFormat = Mail.MailFormat.Text
End Select
Select Case UCase(sPriority)
Case "HIGH" : MyMail.Priority = Mail.MailPriority.High
Case "LOW" : MyMail.Priority = Mail.MailPriority.Low
Case Else : MyMail.Priority = Mail.MailPriority.Normal
End Select
'Build an IList of mail attachments.
If sAttach <> "" Then
Dim delim As Char = ","
Dim sSubstr As String
For Each sSubstr In sAttach.Split(delim)
Dim myAttachment As Net.Mail.Attachment = New Net.Mail.Attachment(sSubstr)
MyMail.Attachments.Add(myAttachment)
Next
End If
Mail.SmtpMail.SmtpServer = sMailServer
Mail.SmtpMail.Send(MyMail)
lblMsg1.Text = "VB Message sent to " & MyMail.To
End Sub
End Class
those programming error :The transport failed to connect to the server.
how to solve the error
pls reply me........
This is a network related error. Your application cannot connect to the mail server specified.
SmtpMail.SmtpServer
Is a valid SMTP Server?
Check to be sure the server System.Web.Mail is executing on can connect to the mail server. Some times firewalls or proxy servers can get in the way.
Try specifying the value by IP address. Poor DNS resolution can sometimes hinder name lookups.
Make sure the that the mail server is running at port 25.
If you did not specify a SmtpMail.SmtpServer property, or if SmtpMail.SmtpServer points to "localhost" (or the equivalent), be sure the SMTP Service is running on port 25.
For testing purposes change the MailMessage.From and MailMessage.To properties to an address that exists on SmtpMail.SmtpServer. Some times this exception is thrown, when it really is a relay issue.
hi,
how to send the mail from C# ASP.NET coding pls reply me........
hi,
how to send the mail from C# ASP.NET coding pls sent me a coding very urgent....................
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Brian van den Broek |
last post by:
Hi all,
There have been a few posts over the last month or so expressing a bit
of exasperation with the "rising tide of newbie's". (Or, more
accurately, the rising tide of questions from...
|
by: John |
last post by:
Hi
Here is a mailing system to send html flyers via email;
http://www.webwizguide.info/asp/sample_scripts/software_downloader.asp. Are
there others around?
Thanks
Regards
|
by: Mainlander |
last post by:
An ISP I belong to uses Majordomo for their mailing list system. I'd like
to encourage them to move to a system that uses a database, preferably
psql which they already run on their server....
|
by: Grim Reaper |
last post by:
I print mailing labels out of Access 2000 databases about 3 to 4 times a
week. I have been having problems with one thing since I have been printing
mailing labels.
I print mailing labels by...
|
by: Ashish Gupta |
last post by:
Hi Guys
I am using mailing list web service of infoUSA.com.
Sometimes it gives the following error :
System.Web.Services.Protocols.SoapException: Server was unable to process
request. --->...
|
by: SatishPasala |
last post by:
hi
This is a very active group. Anyways
I am trying to add Mailing functionality to C# Console Application. How
do I get started with here... (I used to use System.Web.Mail in ASP.NET...
|
by: Mikey |
last post by:
Sample VB .NET source code to create mailing labels or customized letters
using MS Word MailMerge
This VB .NET source code will start MS Word and call methods and set
properties in MS Word to...
|
by: Andy M |
last post by:
ALERT
There is a person by the name of Mike Cox who's trying
to turn this mailing list into a Big-8 newsgroup. Many
of you know that this and most of the other postresql
mailing lists are...
|
by: believ3r |
last post by:
Hi
I've been looking for an open-source php script, which I want to tweak
for internal use on a network.
Anyway, regardless, might anyone suggest to me a script capable of
forwarding any...
|
by: jenny.pig.999 |
last post by:
We have been supplying BP server and mailing server since 1999.
All of these servers have been entered into main USA,Canada,Europen
and other counteries.
Believe in us,we had been the best BP...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |