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

what is smtp host name for sending mail using yahoomail ID?

Hello all
I am using smtp for sending mail.
it ask the smtp host name. that is
Expand|Select|Wrap|Line Numbers
  1.  smtp.Host = "smtp.gmail.com";
  2.  
what is for yahoo/rediff/hotmail

is there any one for globle mail systems.

the other problem is it ask for Credentials
I have to give my gmail user name and password which I donn want to supply.
Expand|Select|Wrap|Line Numbers
  1.  smtp.Credentials = new System.Net.NetworkCredential
  2.              ("yourgmailemailID@gmail.com", "yourGmailPassword");
  3.  
plz help me to come out thi problem.

thank you
Jan 2 '10 #1
4 6594
tlhintoq
3,525 Expert 2GB
Whether it is outlook, or Microsoft mail, or Thunderbird mail, or the program you make to do mail... you have to tell it what email account to use.

That email account consists of a server, account name and password. That is the nature of email.
Jan 2 '10 #2
I am Talking about mail sending in Asp.Net using C#.
I have the following code
Expand|Select|Wrap|Line Numbers
  1. using System.Net.Mail
  2.  
Expand|Select|Wrap|Line Numbers
  1.  MailMessage mail = new MailMessage();
  2.         mail.To.Add("kkapilchoubisa@gmail.com");
  3.         mail.From = new MailAddress("kkapilchoubisa@rediff.com");
  4.         mail.Subject = "hi";
  5.         mail.Body = "Hello dear hw r u";
  6.         SmtpClient smtp = new SmtpClient();
  7.         smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
  8.         try
  9.         {
  10.             smtp.Send(mail);
  11.         }
  12.         catch
  13.         {
  14.         }
  15.  
It generates no exception but kkapilchoubisa@gmail.com can not get any email.

I have another code:

Expand|Select|Wrap|Line Numbers
  1. using System.Net.mail;
  2.  
Expand|Select|Wrap|Line Numbers
  1.  MailMessage mail = new MailMessage();
  2.  
  3.         mail.To.Add("kkapilchoubisa@gmail.com");
  4.  
  5.         mail.From = new MailAddress("kkapilchoubisa@rediff.com");
  6.  
  7.         mail.Subject = "Test Email";
  8.  
  9.         mail.Body = "This is a test mail!!";
  10.  
  11.         string atch = Server.MapPath("problem.docx");
  12.         mail.Attachments.Add(new Attachment(atch));
  13.         SmtpClient smtp = new SmtpClient();
  14.  
  15.         smtp.Host = "smtp.gmail.com"; //Or Your SMTP Server Address   587
  16.  
  17.         smtp.Credentials = new System.Net.NetworkCredential
  18.            ("yourGmailID@gmail.com", "yourGmailPassword");
  19.         //Or your Smtp Email ID and Password
  20.         smtp.EnableSsl = true;
  21.         smtp.Send(mail);
  22.  
this code runs successfuly. Please tell me what can I do in my first code by which I avoid to pass my EmailId and Password.


These all is in Asp.net using C# code

Thanks
Jan 4 '10 #3
tlhintoq
3,525 Expert 2GB
Please tell me what can I do in my first code by which I avoid to pass my EmailId and Password.
You can't. It doesn't matter if you are using ASP or BASIC. Email requires an account. It has to be sent from someone.
Jan 4 '10 #4
Plater
7,872 Expert 4TB
SMTP servers generally will NOT send mail to an email account it does not controll, without first logging in as a valid user.

For example:
If i send mail with smtp.mydomain.com, I can probably send email to JoeUser@mydomain.com without "logging in", but if i wanted to send an email to JoeUser@gmail.com, then I would need to authenticate with smtp.mydomain.com (possibly as say plater@mydomain.com and then a password) in order to send out the email.
Jan 5 '10 #5

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

Similar topics

11
by: zaebos | last post by:
hi, i have this code which is part of a main program, to email from within the program a log file: int MailIt (char *mailserver, char *emailto, char *emailfrom, char *emailsubject, char...
7
by: oopsbabies | last post by:
Hello everyone, I am using Apache 1.3.33 as the web server and PHP version 4.3.10. My machine is using Windows XP 2002 professional edition which comes with a Windows firewall. I am using McAfee...
1
by: Chubbly Geezer | last post by:
Hi I am using the following code to send an email from within my program:- MailMessage theMailMessage = new MailMessage("from@email.com", "to@email.com"); theMailMessage.Body = "body email...
4
by: lage | last post by:
Hi, I am working with a web site that uses CDONTS from a function in a Com+ component to send mail to clients after sign up etc, as well as sending clients mail to support from a web form. A...
2
by: =?Utf-8?B?QWRl?= | last post by:
HI All, I am encountering the following error when I try to send an email through a SMTP server. I believe the problem lies with the authentication part when the network crednetials are used,...
9
by: SREEDEV | last post by:
I am sending a email with a HTML body from my VB.NET application using SMTP protocol. I am facing a problem when i send a long HTML text as body. Its working perfectly with small HTML body. But that...
5
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Hi, I'm using this code for sending emails and its working fine because I had configured SMTP in my machine in IIS. now I'm using machine as a server for this application. but when running the...
3
by: shansivamani | last post by:
using SMTP to send email. is there any settings need to be configured apart from Host name and Port, while sending emails using SMTPClient in .Net? when i try to send mail to ids which has only...
0
by: lopes80andre | last post by:
Hi, I'am trying to configure a Postfix server to send e-mails by SMTP using the SMTP server of my ISP. I have made a Postfix installation as "Internet with Smarthost". I'am using a domain in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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:
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...

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.