Oliver Jones

Any way to debug why emails are not firing off.

All smtp settings seem fine but emails are not reaching smtp server and the site is not throwing errors.

Any debug settings anywhere?


Can you detail your setup a bit? Are you using your own server, are you using a hosted service (godaddy for example)?
Oliver Jones


It is a dedicated server. I'm using the default SMTP server 'within' IIS on Windows server 2003.

The SMTP server is setup to send email from as well is the boxes' IPs.

No authentication is required.

The email isn't showing up on the SMTP logs so I assume it is not reaching the SMTP server.

Somewhere I'm sure there is a SMTP debugger because this always drives me nuts!

Thanks for any help
If I'm reading you correctly you have another server that actually handles your mail, and that server's SMTP logs aren't showing any activity from your web server.

Assuming that's correct..

Turn on SMTP logging on your web server via IIS (also make sure the SMTP service is actually running within IIS.. sometimes on an old server mine would randomly stop itself). Check that log (typically located in C:\WINDOWS\system32\LogFiles\SMTPSVC1)

Also check the Badmail folder (typically c:/inetpub/mailroot/badmail) to see if there's anything in it.

Hopefully one of those will help you identify the source of the failure.

If the web server's SMTP log is still showing nothing, post your web.config and what version of YAF you're playing with. :cheesy:
Oliver Jones
Thanks imukai

No, it's the same box.

All logging is turned on, the smtp service is fine and running. No bad or queued mail, all mailroot folders empty.

Version YAF-v1.9.3-FINAL-BIN-NET20
File Attachment(s):
mail.txt (1kb) downloaded 74 time(s).
web.txt (10kb) downloaded 63 time(s).
Initial thing I would try in your mail.config file would be to change to localhost.

Don't ask me why that works, since localhost should resolve to anyway.

The other thing, stop/start the web application. As far as I know (could be wrong), changes to external configuration files such as your mail.config do not automatically cause IIS to re-read them, as if you had made a change to web.config directly. A stop/start would cause it to read the new settings.

If those two things still fail.. we'll think some more. It's bound to be something simple.
  •  eshan
  • 56.6% (Neutral)
  • YAF Forumling
I am also having some what similar kind of issue....
my mail.config is

<smtp from="someaddress@gmail.com" deliveryMethod="Network">
<!-- Uncomment to specify SMTP settings -->
<network host="localhost" port="25" />

all mails go to the queue folder and nothing happens...But some of the mails are sent after say an hour but not all.

(A newbie...)
eshan wrote:

all mails go to the queue folder and nothing happens...But some of the mails are sent after say an hour but not all.

Your issue sounds like it is different from Oliver's. Your issue sounds like your web server's SMTP is not configured properly to send the emails out to whichever server you need for SMTP services.

You would likely need to find an IIS forum to help diagnose your IIS SMTP configuration, since YAF is successfully adding them into your Queue. Or find one of the consultants on this forum that would be able to help you look at those settings in your environment.
Oliver Jones
Hi Tried all combos of localhost / / actual IP no luck plus any number of iisresets :(

Any email test scripts hidden in the code anywhere?

Not to my knowledge, but I could sum all that up in a thimble so that doesn't mean one doesn't exist.

Ok.. new questions.

1. What emails are you attempting to send out? New topic notifications or new user registration confirmations, etc?

2. Under Admin / Event Log do you see anything recent? Post it up.

3. Can you get into SQL? Look at the yaf_Mail table to see if there's anything pending.
Oliver Jones
I'm sending out a forgotten password email, which doesn't error in any way.

There's nothing in Event viewer in terms of System or Application errors.

Mail table is empty.

Not much to go on is it!
Not the server's event log, but rather YAF's. If you go into the Admin menu, then Event Log is along the left menu.

Silly question, but does the user in question have an email address listed in the profile?

Also, have you tried other types of email? Example: mark a forum as Watched then make a post as another user in that forum, to see if the new topic email goes out? Might be a bug with the forgot password.
Oliver Jones
Nothing in the YAF event log.

All users have emails in profile.

Tried a different email, an account verification email (after configuring it to verify email address).

Still nothing.

Sorry imukai!
Have you tried putting a breakpoint in the recoverpassword.ascx.cs file to trace the code to make sure it is getting to the point where it is sending the email?

I am using 1.9.2 version of the code but I would imagine this hasn't changed much. The code is in the subfolder pages/recoverpassword.ascx.cs - looking at the method PasswordRecovery1_SendingMail()

Sorry for butting in on this post, just thought I would throw out a suggestion or two :-d
Butt in all you want.. I'm just helping Oliver beat his head against a wall. :cheesy:

Oliver, only other thing I'd suggest is going into SendMail.cs to the Send() method and wrap a try/catch block around the actual sending bit (line 94) and maybe add some debug code in there, in case some sort of nonfatal error is popping up that isn't caught elsewhere.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved