By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,890 Members | 1,115 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,890 IT Pros & Developers. It's quick & easy.

MailMessage

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.