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

Send a mail with System.Net.Mail.SmtpClient

hi, i´m doing a aplication in asp.net 2.0 and i want send an automatic
mail when the users do an operations. i use the library
System.Net.Mail.MailMessage. and I specify all the properties
(to,from,body,host and port). i want send the mail by another port not
from the port 25. Can i do That?. I dont specify credencials.
i configure the server to the port that i want send in the IIS, but its
not works.

System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The
server response was: 5.7.1 Unable to relay....

this is the error.

Can I send the mail by another port that is not the 25?

thks and sorry for my English!

Aug 23 '06 #1
1 2025

I have a complete 2.0 (and 1.1) example at my blog.

You have to match the ports.
Your smtp server has to receive messages on a non standard port ........
If that's the case, then you can specify a different port number.

http://sholliday.spaces.live.com/ 2/8/2006 entry

"refv8" <fe**************@globalsis.com.arwrote in message
news:11*********************@i3g2000cwc.googlegrou ps.com...
hi, i´m doing a aplication in asp.net 2.0 and i want send an automatic
mail when the users do an operations. i use the library
System.Net.Mail.MailMessage. and I specify all the properties
(to,from,body,host and port). i want send the mail by another port not
from the port 25. Can i do That?. I dont specify credencials.
i configure the server to the port that i want send in the IIS, but its
not works.

System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The
server response was: 5.7.1 Unable to relay....

this is the error.

Can I send the mail by another port that is not the 25?

thks and sorry for my English!
Aug 23 '06 #2

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

Similar topics

0
by: Jay | last post by:
The code below is a recommended way to send email with c# from my aspx page: MailMessage mail = new MailMessage(); mail.From = new MailAddress("development@ziptax.com"); mail.To.Add(new...
0
by: Dave S | last post by:
I have a lot of forms on our web site that require the user to fill out information and submit it back to us. currently the information comes back as name value pair. The our employee's then has to...
2
by: Cimento Cola | last post by:
Hello all. Hope anyone can help me! I have this form, with: Please choose your file: (browse) The main purpose is the user to select a local file and then when he submits a mail should be...
2
by: David Lozzi | last post by:
Howdy, I'm new to .Net 2.0... Getting "System.Net.Mail.SmtpException: The operation has timed out" on this script at the smtpClient.Send(msg) line Dim msg As New MailMessage
0
by: howardr101 | last post by:
Hi, Have hunted around on the groups and can't find anything, hence. I've tried this against 2 mail servers (mailtraq and hmailserver) and it occus with both. The problems seems to be that...
14
by: Professor Yonce | last post by:
I have made form for E-Mail. I have entered code but the Import system does not work. It has squiggly line underneath it showing it is not communicating. It Will not build. Public Class...
2
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to...
8
by: shapper | last post by:
Hello, I am trying to send an email using Asp.Net 2.0. I am getting the following error: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: No such...
7
by: Rob Dob | last post by:
The following code is giving me a timeout problem., no matter what I do I can't send a piece of mail using .net2.0 System.Net.Mail.SmtpClient via port 465 and using ssl, if however I try using...
2
by: mabubakarpk | last post by:
Hello All, I want to send mail through asp.net to other my company domain e.g yahoo, hotmail etc Code is as below ////Start Code//////// Imports System.Net.Mail Dim MailMessage As...
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:
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: 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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
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...

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.