473,386 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

strange web.mail problem

I'm trying to have a method in a page which checks the
database for user's email.
The query populates the variable strEmailTo and then sends
the email:

MailMessage msg = new MailMessage();
msg.To = strEmailTo;
msg.From = strEmailFrom;
msg.Subject = "whatever";
msg.Body = "whatever";
SmtpMail.SmtpServer=strSMTP;
SmtpMail.Send(msg);

However no email is recieved and no error message comes up.

The strange part is that if I hardcode the variable value:
strEmailTo="ju*********@hotmail.com"; it works.
The query is definitely passing the variable the same value
(I'm displaying it on the screen).

Any suggestions? TIA, John.

Jul 21 '05 #1
1 1205
Do some tracing to see what is really being passed in as your variables,
just to be sure.

Additionally, if you're using Exchange as your server, it may not think that
the message is allowed to send. Check the outbound queues to see if
something is really getting to them and it's just dumping the message.

Robert
"John McD" <ju*********@hotmail.com> wrote in message
news:07****************************@phx.gbl...
I'm trying to have a method in a page which checks the
database for user's email.
The query populates the variable strEmailTo and then sends
the email:

MailMessage msg = new MailMessage();
msg.To = strEmailTo;
msg.From = strEmailFrom;
msg.Subject = "whatever";
msg.Body = "whatever";
SmtpMail.SmtpServer=strSMTP;
SmtpMail.Send(msg);

However no email is recieved and no error message comes up.

The strange part is that if I hardcode the variable value:
strEmailTo="ju*********@hotmail.com"; it works.
The query is definitely passing the variable the same value
(I'm displaying it on the screen).

Any suggestions? TIA, John.

Jul 21 '05 #2

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

Similar topics

10
by: Carlos Ribeiro | last post by:
Hello all. I'm sending this to the list because I would like to know if someone else has ever stumbled across this one, and also because one possible solution is to patch, or simply "decorate",...
2
by: vamsikrishna_b | last post by:
Hello all,the following problem i encountered while transferring data(mail ids) from MS-outlook to one application.Some mail ids after came into the application looked as strange characters.Eg are...
1
by: seemanta dutta | last post by:
Hi, I have a simple form which when clicked mails a user via the cgi script. But the problem is that when I run the script from the commandline it works well. but the moment I try to do it via...
2
by: Henok Girma | last post by:
Hello Gurus, i have a very strange problem that is killing me.. I have a stored procedure that e-mails, that stored procedure is called from diffrent table triggers.. on table a the trigers...
6
by: Mike the Canadian | last post by:
I am having a very strange problem sending email with php. I have two domains. I can send an email to one domain using php but not the other. If I put both email addresses in the mail command only...
1
by: John | last post by:
Hi First of all apologies for posting so much code but this is rather involved and I am totally stumped. Basically I have a main form (Staff Batch SMS/E-Mail) which calls a function (SendSMS) in...
11
by: Marlene Stebbins | last post by:
Something very strange is going on here. I don't know if it's a C problem or an implementation problem. The program reads data from a file and loads it into two arrays. When xy, x, y, *xlist and...
8
by: Spam Trap | last post by:
I am getting strange resizing problems when using an inherited form. Controls are moving themselves seemingly randomly, but reproducibly. "frmBase" is my base class (a windows form), and...
4
by: Nate Murray | last post by:
Hey all, I'm having a strange PHP (4.3.10) problem that seems to have something to do with javascript. This is a bit complex, so hold on to your hats. My issue is that a single function is...
0
by: RickVidallon | last post by:
Missing or Truncated Body Text in Email Application - 2 Strange Examples... There is no earthly reason why this is happening! EXAMPLES HERE: http://65.36.227.70/actmailer/ We have a...
0
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,...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...

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.