473,503 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MailMessage

Jul
Hi,

I use MailMessage class for create email.

I specify such settings:
mmEmail = New MailMessage
mmEmail.To = ".."
mmEmail.Body = "..."
mmEmail.Subject = "..."
mmEmail.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer = "..."
SmtpMail.Send(mmEmail)

when I get email send by such code, I can not explain the source of "From"
..
How can I check "FROM" property and change it.

This question not for "spam" programming.

Thanks
Nov 21 '05 #1
6 2181
Hi,

The mail message class a from property.
http://msdn.microsoft.com/library/de...sfromtopic.asp

Ken
------------------------------
"Jul" <ju********@sympatico.ca> wrote in message
news:zZ*********************@news20.bellglobal.com ...
Hi,

I use MailMessage class for create email.

I specify such settings:
mmEmail = New MailMessage
mmEmail.To = ".."
mmEmail.Body = "..."
mmEmail.Subject = "..."
mmEmail.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer = "..."
SmtpMail.Send(mmEmail)

when I get email send by such code, I can not explain the source of "From"
..
How can I check "FROM" property and change it.

This question not for "spam" programming.

Thanks

Nov 21 '05 #2
Jul,
In addition to Ken's link on the MailMessage.From property itself.

The System.Web.Mail FAQ (http://www.systemwebmail.net/) has some addition
info on the From property (as well as MailMessage itself):

http://www.systemwebmail.net/faq/2.4.aspx

Hope this helps
Jay
"Jul" <ju********@sympatico.ca> wrote in message
news:zZ*********************@news20.bellglobal.com ...
Hi,

I use MailMessage class for create email.

I specify such settings:
mmEmail = New MailMessage
mmEmail.To = ".."
mmEmail.Body = "..."
mmEmail.Subject = "..."
mmEmail.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer = "..."
SmtpMail.Send(mmEmail)

when I get email send by such code, I can not explain the source of "From"
.
How can I check "FROM" property and change it.

This question not for "spam" programming.

Thanks

Nov 21 '05 #3
Jul
Hi ,

Thanks for you answers, but I still have a question.
I did not set up "From" property, but it contain value when I get mail.
How that property was set up?
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#m**************@TK2MSFTNGP15.phx.gbl...
Jul,
In addition to Ken's link on the MailMessage.From property itself.

The System.Web.Mail FAQ (http://www.systemwebmail.net/) has some addition
info on the From property (as well as MailMessage itself):

http://www.systemwebmail.net/faq/2.4.aspx

Hope this helps
Jay
"Jul" <ju********@sympatico.ca> wrote in message
news:zZ*********************@news20.bellglobal.com ...
Hi,

I use MailMessage class for create email.

I specify such settings:
mmEmail = New MailMessage
mmEmail.To = ".."
mmEmail.Body = "..."
mmEmail.Subject = "..."
mmEmail.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer = "..."
SmtpMail.Send(mmEmail)

when I get email send by such code, I can not explain the source of "From" .
How can I check "FROM" property and change it.

This question not for "spam" programming.

Thanks


Nov 21 '05 #4
Jul,
I'm really not sure what you are asking, what is it set to on the emails you
received?

If its not what you expect, then I would suggest using MailMessage.From to
change it.

Are you using .NET 1.0, 1.1 or the 2.0 beta?

Which OS are you running under?

Are you running under Windows Forms, a Windows Server, or ASP.NET?
FWIW: On .NET 1.1 (VS.NET 2003) on Windows XP SP2 in a Windows Forms, using
Cox for the SmptServer, the From field is required, you receive an exception
if you leave From at the default of Nothing.

Hope this helps
Jay

"Jul" <ju********@sympatico.ca> wrote in message
news:0d****************@news20.bellglobal.com...
Hi ,

Thanks for you answers, but I still have a question.
I did not set up "From" property, but it contain value when I get mail.
How that property was set up?
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#m**************@TK2MSFTNGP15.phx.gbl...
Jul,
In addition to Ken's link on the MailMessage.From property itself.

The System.Web.Mail FAQ (http://www.systemwebmail.net/) has some addition
info on the From property (as well as MailMessage itself):

http://www.systemwebmail.net/faq/2.4.aspx

Hope this helps
Jay
"Jul" <ju********@sympatico.ca> wrote in message
news:zZ*********************@news20.bellglobal.com ...
> Hi,
>
> I use MailMessage class for create email.
>
> I specify such settings:
> mmEmail = New MailMessage
> mmEmail.To = ".."
> mmEmail.Body = "..."
> mmEmail.Subject = "..."
> mmEmail.BodyFormat = MailFormat.Text
> SmtpMail.SmtpServer = "..."
> SmtpMail.Send(mmEmail)
>
> when I get email send by such code, I can not explain the source of "From" > .
> How can I check "FROM" property and change it.
>
> This question not for "spam" programming.
>
> Thanks
>
>



Nov 21 '05 #5
Jul,
What more question:

What are SMTP server are you using? LocalHost, an internal SMTP server, an
external one?

Hope this helps
Jay

"Jul" <ju********@sympatico.ca> wrote in message
news:0d****************@news20.bellglobal.com...
Hi ,

Thanks for you answers, but I still have a question.
I did not set up "From" property, but it contain value when I get mail.
How that property was set up?
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#m**************@TK2MSFTNGP15.phx.gbl...
Jul,
In addition to Ken's link on the MailMessage.From property itself.

The System.Web.Mail FAQ (http://www.systemwebmail.net/) has some addition
info on the From property (as well as MailMessage itself):

http://www.systemwebmail.net/faq/2.4.aspx

Hope this helps
Jay
"Jul" <ju********@sympatico.ca> wrote in message
news:zZ*********************@news20.bellglobal.com ...
> Hi,
>
> I use MailMessage class for create email.
>
> I specify such settings:
> mmEmail = New MailMessage
> mmEmail.To = ".."
> mmEmail.Body = "..."
> mmEmail.Subject = "..."
> mmEmail.BodyFormat = MailFormat.Text
> SmtpMail.SmtpServer = "..."
> SmtpMail.Send(mmEmail)
>
> when I get email send by such code, I can not explain the source of "From" > .
> How can I check "FROM" property and change it.
>
> This question not for "spam" programming.
>
> Thanks
>
>



Nov 21 '05 #6
Jul
I use Win 2000 pro
..Net 1.1 - if you need more info about platform I can provide

internal SMTP server - I can not give more information about it, I was just
given "abc.com", so if it is all I know

Sure I can change FROM information as you mentioned previously but it is
interesting the source of my "default" settings

Thansk
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:#R**************@TK2MSFTNGP09.phx.gbl...
Jul,
What more question:

What are SMTP server are you using? LocalHost, an internal SMTP server, an
external one?

Hope this helps
Jay

"Jul" <ju********@sympatico.ca> wrote in message
news:0d****************@news20.bellglobal.com...
Hi ,

Thanks for you answers, but I still have a question.
I did not set up "From" property, but it contain value when I get mail.
How that property was set up?
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message news:#m**************@TK2MSFTNGP15.phx.gbl...
Jul,
In addition to Ken's link on the MailMessage.From property itself.

The System.Web.Mail FAQ (http://www.systemwebmail.net/) has some addition info on the From property (as well as MailMessage itself):

http://www.systemwebmail.net/faq/2.4.aspx

Hope this helps
Jay
"Jul" <ju********@sympatico.ca> wrote in message
news:zZ*********************@news20.bellglobal.com ...
> Hi,
>
> I use MailMessage class for create email.
>
> I specify such settings:
> mmEmail = New MailMessage
> mmEmail.To = ".."
> mmEmail.Body = "..."
> mmEmail.Subject = "..."
> mmEmail.BodyFormat = MailFormat.Text
> SmtpMail.SmtpServer = "..."
> SmtpMail.Send(mmEmail)
>
> when I get email send by such code, I can not explain the source of

"From"
> .
> How can I check "FROM" property and change it.
>
> This question not for "spam" programming.
>
> Thanks
>
>



Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
8641
by: Trond A. S. Andersen | last post by:
Hi, all! I'm trying to use the System.Web.Mail. "package" combinded with System.Web.Mail.SmtpMail in order to send MS Excel spreadsheets attached to mail messages. However, sending one single...
4
7761
by: Mark Rae | last post by:
Hi, Can anyone please tell me if it's possible to pass a System.Web.Mail.MailMessage object to a ASP.NET Web Service? Maybe using XML Serialization / Deserialization? I've been asked to...
3
3250
by: Phil Mc | last post by:
Hi has anyone come accross the problem.... with referance to System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail THIS WORKS FINE mail=new MailMessage(); mail.From =...
5
2219
by: martin | last post by:
Hi, I have created a class that is totally seperate from my web application. However this class is used extensivly by the web application for stuff like data access. I wish to add a function to...
4
7526
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
1
6807
by: asnowfall | last post by:
I am creating MailMessage out of already existing email message. My existing message has few custom properties. I wan to add them to System.Net.Mail.MailMessage How to add custom properties? ...
2
3089
by: asnowfall | last post by:
I am trying to build System.Mail.MailMessage object out of mime encoded SMTP data. I have following questions Byte byteMailData; //mime encoded STMP data for "email with attachment" 1)...
5
2095
by: Vlad | last post by:
We are trying to set MailMessage Content-Type to be text/calendar The following code has been used: string subject = "Calendar test 3"; MailMessage emailMessage = new MailMessage();...
2
8783
by: =?Utf-8?B?Q2FwdGFpbiBEYXZlIQ==?= | last post by:
I wrote some code to send an email with two alternate views: 1) html 2) plain text All the html enabled email clients accept the html just fine and disregard the plain text version. However,...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7322
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.