Hi all,
I'm trying to send an e-mail from a vb.net web form. I can create the
message, but when it comes to actually sending it I get the following
error. "Mailbox name not allowed. The server response was: Server
policy dictates you must authenticate first "
So far as I can tell, my code is doing what it's meant to, but I'd
appreciate someone casting an eye over it to make sure. This is based
on a couple of examples found through google.
<code>
Dim Message As MailMessage = New MailMessage()
Dim Smtp As New SmtpClient()
Dim SmtpUser As New System.Net.Netw orkCredential()
'-- Build Message
Message.From = New MailAddress("me @mydomain.co.uk ", "Me")
Message.To.Add( New MailAddress("yo *@mydomain.co.u k", "you"))
Message.IsBodyH tml = False
Message.Subject = "test"
Message.Body = "This is a test"
'-- Define Authenticated User
SmtpUser.UserNa me = "user"
SmtpUser.Passwo rd = "password"
SmtpUser.Domain = "mydomain.co.uk "
'-- Send Message
Smtp.UseDefault Credentials = False
Smtp.Credential s = SmtpUser
Smtp.Host = "mydomain.co.uk "
Smtp.Port = 25
Smtp.DeliveryMe thod = SmtpDeliveryMet hod.Network
Smtp.Send(Messa ge)
</code> 4 2979
The error message suggests that mydomain.co.uk is asking for SMTP
authentication.
Are you sure that particular SMTP can relay email messages without
authentication.
--
MAdhur
"eruth" <em***********@ gmail.comwrote in message
news:cf******** *************** ***********@34g 2000hsh.googleg roups.com...
Hi all,
I'm trying to send an e-mail from a vb.net web form. I can create the
message, but when it comes to actually sending it I get the following
error. "Mailbox name not allowed. The server response was: Server
policy dictates you must authenticate first "
So far as I can tell, my code is doing what it's meant to, but I'd
appreciate someone casting an eye over it to make sure. This is based
on a couple of examples found through google.
<code>
Dim Message As MailMessage = New MailMessage()
Dim Smtp As New SmtpClient()
Dim SmtpUser As New System.Net.Netw orkCredential()
'-- Build Message
Message.From = New MailAddress("me @mydomain.co.uk ", "Me")
Message.To.Add( New MailAddress("yo *@mydomain.co.u k", "you"))
Message.IsBodyH tml = False
Message.Subject = "test"
Message.Body = "This is a test"
'-- Define Authenticated User
SmtpUser.UserNa me = "user"
SmtpUser.Passwo rd = "password"
SmtpUser.Domain = "mydomain.co.uk "
'-- Send Message
Smtp.UseDefault Credentials = False
Smtp.Credential s = SmtpUser
Smtp.Host = "mydomain.co.uk "
Smtp.Port = 25
Smtp.DeliveryMe thod = SmtpDeliveryMet hod.Network
Smtp.Send(Messa ge)
</code>
If authentication is turned off, the mail can be sent, but as soon as
we turn it back on, I get that message.
On May 12, 7:08 pm, "Madhur" <s...@df.comwro te:
The error message suggests that mydomain.co.uk is asking for SMTP
authentication.
Are you sure that particular SMTP can relay email messages without
authentication.
--
MAdhur
"eruth" <emma.pearl...@ gmail.comwrote in message
news:cf******** *************** ***********@34g 2000hsh.googleg roups.com...
Hi all,
I'm trying to send an e-mail from a vb.net web form. I can create the
message, but when it comes to actually sending it I get the following
error. "Mailbox name not allowed. The server response was: Server
policy dictates you must authenticate first "
So far as I can tell, my code is doing what it's meant to, but I'd
appreciate someone casting an eye over it to make sure. This is based
on a couple of examples found through google.
<code>
Dim Message As MailMessage = New MailMessage()
Dim Smtp As New SmtpClient()
Dim SmtpUser As New System.Net.Netw orkCredential()
'-- Build Message
Message.From = New MailAddress("m. ..@mydomain.co. uk", "Me")
Message.To.Add( New MailAddress("y. ..@mydomain.co. uk", "you"))
Message.IsBodyH tml = False
Message.Subject = "test"
Message.Body = "This is a test"
'-- Define Authenticated User
SmtpUser.UserNa me = "user"
SmtpUser.Passwo rd = "password"
SmtpUser.Domain = "mydomain.co.uk "
'-- Send Message
Smtp.UseDefault Credentials = False
Smtp.Credential s = SmtpUser
Smtp.Host = "mydomain.co.uk "
Smtp.Port = 25
Smtp.DeliveryMe thod = SmtpDeliveryMet hod.Network
Smtp.Send(Messa ge)
</code>
Check if your authentication requires some security encryption.
"eruth" <em***********@ gmail.comwrote in message
news:67******** *************** ***********@m73 g2000hsh.google groups.com...
If authentication is turned off, the mail can be sent, but as soon as
we turn it back on, I get that message.
On May 12, 7:08 pm, "Madhur" <s...@df.comwro te:
>The error message suggests that mydomain.co.uk is asking for SMTP authentication .
Are you sure that particular SMTP can relay email messages without authentication .
-- MAdhur
"eruth" <emma.pearl...@ gmail.comwrote in message
news:cf******* *************** ************@34 g2000hsh.google groups.com...
Hi all,
I'm trying to send an e-mail from a vb.net web form. I can create the
message, but when it comes to actually sending it I get the following
error. "Mailbox name not allowed. The server response was: Server
policy dictates you must authenticate first "
So far as I can tell, my code is doing what it's meant to, but I'd
appreciate someone casting an eye over it to make sure. This is based
on a couple of examples found through google.
<code>
Dim Message As MailMessage = New MailMessage()
Dim Smtp As New SmtpClient()
Dim SmtpUser As New System.Net.Netw orkCredential()
'-- Build Message
Message.From = New MailAddress("m. ..@mydomain.co. uk", "Me")
Message.To.Add( New MailAddress("y. ..@mydomain.co. uk", "you"))
Message.IsBodyH tml = False
Message.Subject = "test"
Message.Body = "This is a test"
'-- Define Authenticated User
SmtpUser.UserNa me = "user"
SmtpUser.Passwo rd = "password"
SmtpUser.Domain = "mydomain.co.uk "
'-- Send Message
Smtp.UseDefault Credentials = False
Smtp.Credential s = SmtpUser
Smtp.Host = "mydomain.co.uk "
Smtp.Port = 25
Smtp.DeliveryMe thod = SmtpDeliveryMet hod.Network
Smtp.Send(Messa ge)
</code>
On May 13, 1:36 pm, "Madhur" <s...@df.comwro te:
Check if your authentication requires some security encryption.
"eruth" <emma.pearl...@ gmail.comwrote in message
news:67******** *************** ***********@m73 g2000hsh.google groups.com...
If authentication is turned off, the mail can be sent, but as soon as
we turn it back on, I get that message.
On May 12, 7:08 pm, "Madhur" <s...@df.comwro te:
The error message suggests that mydomain.co.uk is asking for SMTP
authentication.
Are you sure that particular SMTP can relay email messages without
authentication.
--
MAdhur
"eruth" <emma.pearl...@ gmail.comwrote in message
>news:cf******* *************** ************@34 g2000hsh.google groups.com...
Hi all,
I'm trying to send an e-mail from a vb.net web form. I can create the
message, but when it comes to actually sending it I get the following
error. "Mailbox name not allowed. The server response was: Server
policy dictates you must authenticate first "
So far as I can tell, my code is doing what it's meant to, but I'd
appreciate someone casting an eye over it to make sure. This is based
on a couple of examples found through google.
<code>
Dim Message As MailMessage = New MailMessage()
Dim Smtp As New SmtpClient()
Dim SmtpUser As New System.Net.Netw orkCredential()
'-- Build Message
Message.From = New MailAddress("m. ..@mydomain.co. uk", "Me")
Message.To.Add( New MailAddress("y. ..@mydomain.co. uk", "you"))
Message.IsBodyH tml = False
Message.Subject = "test"
Message.Body = "This is a test"
'-- Define Authenticated User
SmtpUser.UserNa me = "user"
SmtpUser.Passwo rd = "password"
SmtpUser.Domain = "mydomain.co.uk "
'-- Send Message
Smtp.UseDefault Credentials = False
Smtp.Credential s = SmtpUser
Smtp.Host = "mydomain.co.uk "
Smtp.Port = 25
Smtp.DeliveryMe thod = SmtpDeliveryMet hod.Network
Smtp.Send(Messa ge)
</code>
Turns out all this was caused not by my code, but by the SMTP server
not being configured correctly. Nice to know it wasn't me though ;) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: dale zhang |
last post by:
Hi,
I write an asp.net web application. It has a “Contact Us” page, where users
fill in their email, subject and text and hit send. Then the email will go to
my hard coded yahoo email account.
I was using optimum online service with smtp server as “mail.optonline.net”.
I can receive email correctly.
Now I switch to verizon DSL....
|
by: Tushar |
last post by:
Please help: I found some of the following information in messeges in this
group but I would like someone to confirm them please.
I would like to use the following web-services / ASP.Net code to be used in
an intranet environment:
MailMessage Message = new MailMessage();
Message.To = ...
....
SmtpMail.SmtpServer = ...
|
by: Andreas |
last post by:
I am working with three computers, my developing computer, a Web Server and a
Mail Server (Exchange).
I am trying to send a email from the Web Server via the Mail Server to a
valid email address with this code:
MailMessage msgMail = new MailMessage();
msgMail.To = "test@address.com";
msgMail.From = "from@address.com";
msgMail.Subject =...
|
by: T.Archer |
last post by:
The host a client wants to use requires authentication to relay messages.
How do I set the authentication (username/password) before using the
smtpmail.send(mailmessage) method?
Surely this must be a common thing to do. I have been utterly unable to
google an answer.
--Tony Archer
|
by: copyco |
last post by:
I'm trying to write code that will send an e-mail using WinSock.
Problem is that my server requires my password for outgoing e-mail.
What is the SMTP format for supplying the password to the server?? I've
checked out http://www.faqs.org/rfcs/rfc821.html but there is
absoulutely nothing concerning authentication. Any help appreciated.
| |
by: scorpion53061 |
last post by:
I would like to know how you guys are handling this issue......
Some ISP's are now requiring authentication when using SMTP (such as
orcsweb)
while others are refusing to accept plain text authentication
(charter.net for instance) but will send the SMTP mail without providing
authentication
while others such as Comcast I cannot seem to...
|
by: antonyliu2002 |
last post by:
I've set up the virtual smtp server on my IIS 5.1 like so:
1. Assign IP address to "All Unassigned", and listen to port 25.
2. Access Connection granted to "127.0.0.1".
3. Relay only allow "127.0.0.1".
4. Authentication: "Anonymous access" only.
5. Outbound connection listen to TCP 25.
Besides,
|
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 free edition for anti-virus.
I use an ISP provider from my country and according to them I do not
need to perform authentication while sending...
|
by: John Drako |
last post by:
Currently, I run postfix on my own server to send message from my site
(password requests, account activation notices and other messages).
I have phpMailer on the server and all the messages (currently about
1000 messages are sent daily) are sent by SMTP through postfix.
I'm contemplating moving this particular site's email to Gmail.
Is...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |