473,399 Members | 2,858 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,399 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 1214
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: 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
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?
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.