Hello
Iam sending mail from web page like, enquiry form mail using asp and asp.net.while send the mail i don't have any error.
but the mail does't reach the destination.can some one give me a solution for this problem.

ds

Dani AI

Generated

The symptom described — “Send returns no error but mail never arrives” — usually means one of three things: the message is being queued locally (pickup/badmail), the SMTP relay is rejecting or silently dropping the message, or the recipient side is classifying it as spam. was right to check the mailbox folders; ’s snippet didn’t set an SMTP host so it falls back to the local IIS SMTP service; and correctly diagnosed a bad .FROM/envelope or relay restriction as a common root cause.

Troubleshooting checklist (work through each item):

  • Verify which SMTP engine the app is using (local IIS SMTP vs an external relay) and ensure that service is running.
  • Check SMTP queues: Pickup, Queue and Badmail folders for stuck .eml files and read them to see the server error.
  • Confirm the web app identity (ASPNET / app pool account) has write access to the Pickup folder if using IIS pickup delivery.
  • Check relay rules on the SMTP server — allow only the web server IP (not “allow all”) if relaying is needed.
  • Test basic connectivity: firewalls or ISP blocks on port 25 are common; try a manual SMTP session (see example).
  • If using an external SMTP, confirm it requires auth/TLS and configure credentials and correct port (often 587 or 465).
  • If delivery reaches the remote MX but never appears, review spam filtering, SPF/DKIM/Reverse-DNS, and the recipient’s headers.

A minimal manual SMTP test (via telnet) — perform these commands after connecting to port 25:

HELO yourdomain.com
MAIL FROM:<sender@yourdomain.com>
RCPT TO:<recipient@theirhost.com>
DATA
Subject: Test
From: sender@yourdomain.com

Test body
.
QUIT

If the manual session succeeds but the app does not, compare the envelope sender and the app’s SMTP configuration; mismatches or missing authentication commonly explain “no error but no delivery.” For persistent issues, collect the SMTP logs and any badmail files and consider using a trusted external relay/transactional provider to bypass local SMTP complexity.

Recommended Answers

All 5 Replies

1.Make sure your SMTP server path is correct.
2.This may be absurd but check your Bulk folder.Often the mail you send goes to the Bulk folder.
3.Paste your code,if you still arent able to solve the issue.

code

Dim objMessage As New MailMessage
objMessage.From = ""
objMessage.To = ""
objMessage.Subject = "subject"
objMessage.Body = "MailBody"
objMessage.BodyFormat = MailFormat.Html
'Optionally set to external SMTP Server
SmtpMail.SmtpServer = ""
SmtpMail.Send(objMessage)

i haven't given the smtp server.i want to send from one server to another.
please help me out.

Member Avatar for Member #25180

I tried the code and it doesn't work for me either.

I've tried 2 different external SMTP servers and both didn't send any mail.

IIS has a built in SMTP server it will use if you don't supply an SmtpServer String

I'm Positive that there aren't any Firewalls blocking SMTP on any of my routes.

The code I have from "Osborne's - The Complete Reference of ASP.NET" doesn't supply any information other than an example of using System.Web.Mail Methods

Is there anything that might prevent sending any mail?

Member Avatar for Member #25180

I was able to fix my problem with getting ASP.NET to send emails.

I looked into my "badmail" folder located in "C:\Inetpub\mailroot\Badmail" and found this error

Unable to deliver this message because the follow error was encountered: "Error is processing file in pickup directory.".

The specific error code was 0xC00402CE.

I found help at Microsoft's website at http://support.microsoft.com/default.aspx?scid=kb;en-us;319285

Which talked about the .FROM property was bad and you might need to make sure that the From email address is a valid email address.

The other problem is that I wasn't Granted to Relay messages.

Which you need to start IIS >> Right Click your SMTP Virtual Server >> Select Properties >> Select the Access Tab >> Click the Relay... button >> Uncheck "Allow all computers which successfully..." checkbox >> Then Add 127.0.0.1 "local IP address" to the list above the checkbox.

I hope that any of this can help future situations.

Hi all,
I found this above post to be specific for my issue. how can i be sure whether my SMTP virtual server is configured properly ? If its not, then how to do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.