473,388 Members | 1,215 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,388 software developers and data experts.

Problem in Generating mail using c# code after uploading website on server

I am using below code to generate mail through C # code
Expand|Select|Wrap|Line Numbers
  1. SmtpClient smtp = new SmtpClient("smtp.live.com", 587);
  2. smtp.EnableSsl = true;
  3. smtp.UseDefaultCredentials = false;
  4. smtp.Credentials = new NetworkCredential("XYZ@live.com", "********");
  5. MailMessage mail = new MailMessage("XYZ@live.com", "ABC@live.com", "Registered Query", ("Dear Sir" + "\r\n " + "\r\n " + TextBox4.Text + "\r\n " + "\r\n " + TextBox1.Text + "\r\n" + TextBox3.Text + "\r\n" + TextBox2.Text));
  6. smtp.Send(mail);
  7. Response.Redirect("Submitbtn.aspx");
It was working properly offline when i running on my local computer,
But I uploading it on server after publishing website it is not working kindly help……………………
Nov 22 '14 #1
1 1213
Frinavale
9,735 Expert Mod 8TB
It would really help us if you could post the error message.

-Frinny
Nov 24 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Edward | last post by:
My computer is at intranet,I want to use following code to realizing function of sending mail.But this program only can send mail between intranet.If I send mail in internet,I need to through proxy...
2
by: Bob Avallone | last post by:
I found this code of the internet that should create a mail message: 'Create an instance of the MailMessage class Dim objMM As New MailMessage 'Set the properties objMM.To =...
6
by: TPJ | last post by:
Help me please, because I really don't get it. I think it's some stupid mistake I make, but I just can't find it. I have been thinking about it for three days so far and I still haven't found any...
12
by: Geethu03 | last post by:
Hi to all I am a new member to this group. I have a problem in Email Sending using java. That is the mail is sending from my server to any desired mail account. By using the html i created the form...
2
by: prasenjit2007 | last post by:
Hello, can u help me sending Email with attachments using the Class phpMailer. On the website I have a link to an html form in which I input the parameters with the names 1)from(textbox name)...
20
MMcCarthy
by: MMcCarthy | last post by:
This problem was proposed to me but not really my area of expertise so I thought I would open it up to the forum to see if anyone had any bright ideas. The problem is generating Microsoft Word...
0
by: freshj | last post by:
I am attempting to create a C# proxy using WseWsdl3 against a WSDL file created by out Java development staff. I am having the hardest time figuring out what the issue is. Any help would be greatly...
0
debasisdas
by: debasisdas | last post by:
The follwing sample code uses predefined package UTL_SMTP to send mail. This package was first available in the version 8.1.7 . create or replace procedure sendmail(sender varchar2,recipient...
4
by: vivekshekar | last post by:
I'm using Ubuntu OS, I'm trying to send a mail through a program, but I'm not able to do this. This is the program, <?php $Name = "xxx";
3
by: swethak | last post by:
Hi, i placed the php in windows server 2003 manually , set the path in Environmental variables , and place the php.ini file in windows. Now php works fine in my server sytem.When i write the...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
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:
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...
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
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...
0
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...

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.