Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6902337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:47:08+00:00 2026-05-27T07:47:08+00:00

This has been getting on my nerves quite a bit because I can’t find

  • 0

This has been getting on my nerves quite a bit because I can’t find a reason for this not to work. I have an mvcMailer code that works if I specify in web.config to use SMTP. I don’t want to use SMTP though, I want to use the drop folder. This is part of the code that does the sending:

    [HttpPost]
    public ActionResult Edit(Deviation deviation, int[] Epost)
    {
        if (ModelState.IsValid)
        {
            db.Entry(deviation).State = EntityState.Modified;
            db.SaveChanges();

            if (Epost != null)
            {
                var myEpost = from p in db.Users
                              where Epost.Contains(p.UserID)
                              select p;

                myEpost.ToList();

                var subject = deviation.Benamning;
                var body = deviation.KortBeskrivning;
                var avId = deviation.DeviationId;

                foreach (var item in myEpost)
                {
                    var mailer = new UserMailer();
                    var msg = mailer.DeviationMessage(email: item.Epost, body: body, subject: subject, name: item.Name, avId: avId);
                    msg.Send();
                }
            }
            return RedirectToAction("Index");

            //return RedirectToAction("Index");
        }
        return View(deviation);
    }

This code works if the web.config file is configured like this:

<smtp from="user@domain.com">
    <network enableSsl="false" host="192.168.111.11" port="25" userName="user@domain.com" password="password" />
  </smtp>

But neither of these alternatives work, they all give the same error (SMTP host not specified):

<smtp deliveryMethod="SpecifiedPickupDirectory">
    <specifiedPickupDirectory pickupDirectoryLocation="C:\inetpub\mailroot\pickup"/>
  </smtp>

<smtp from="user@domain.com" deliveryMethod="SpecifiedPickupDirectory">
    <specifiedPickupDirectory pickupDirectoryLocation="C:\inetpub\mailroot\pickup"/>
  </smtp>

It’s worth noting I guess, that a file is created in the drop folder anyway, despite the error. I just don’t know what’s wrong, based on what I’ve been able to find on mvcmailer this is the correct configuration to use.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:47:09+00:00Added an answer on May 27, 2026 at 7:47 am

    Try something like below. The below one always work for me:

      <smtp from="some-email@gmail.com" deliveryMethod="SpecifiedPickupDirectory">
              <network host="localhost" />
              <specifiedPickupDirectory pickupDirectoryLocation="c:\temp\"/>
      </smtp>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This has probably been asked before but I can't find it anywhere. I have
It has been quite a while since I am getting this error in the
I suspect this has been asked before, but can't seem to find a question
This has been driving me nuts. I keep getting the following exception System.InvalidOperationException: The
A buddy of mine has been getting this error mesage when trying to run
I'm getting a java.awt.FontFormatException: Unrecognised Font Format error, and I believe this has been
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
This has been working fine, not sure why it's stopped all of a sudden..
This has been asked several times for several languages but I can't get it
Now I know this has been asked a few times, but i'm still not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.