Questions tagged [mta]

Multiple Threaded Apartment of the Component Object Model (COM), as opposed to STA

MTA refers to the Multiple Threaded Apartment of Microsoft's Component Object Model (COM). Its opposite is the Single-Threaded Apartment (MTA), but there is also a Neutral Apartment.

Related tags:

References:

110 questions
18
votes
3 answers

What exactly does an MTA do?

This question got me thinking, and I now realize that I don't know anything about the internals of MTAs. What exactly does an MTA do? Everything after the SMTP protocol seems like dark magic to me. Let's say that I wanted to code a minimalistic MTA…
Alix Axel
  • 151,645
  • 95
  • 393
  • 500
18
votes
2 answers

Meaning that is displayed by [alternatives --config mta] is what?

The following screen appears when run [alternatives --config mta]. There are 2 programs which provide 'mta'. Selection Command ----------------------------------------------- + 1 /usr/sbin/sendmail.postfix * 2 …
user2517435
  • 183
  • 1
  • 6
17
votes
2 answers

What are the limitations of a STA thread in compare to MTA threads?

If we make a thread STA like this: Thread.SetApartmentState(STA); then it cannot run code marked with [MTAThread] attribute. We have seen [STAThread] in windows and console applications but I have never seen code with [MTAThread] attribute and don't…
Xaqron
  • 29,931
  • 42
  • 140
  • 205
14
votes
4 answers

Is there a Python MTA (Mail transfer agent)

Just wondering if there is a Python MTA. I took a look at smtpd but they all look like forwarders without any functionality.
Unknown
  • 45,913
  • 27
  • 138
  • 182
13
votes
3 answers

An MTA Console application calling an STA COM object from multiple threads

Although there are many questions about COM and STA/MTA (e.g. here), most of them talk about applications which have a UI. I, however, have the following setup: A console application, which is by default Multi-Threaded Apartment (Main() explicitly…
bavaza
  • 10,319
  • 10
  • 64
  • 103
12
votes
3 answers

COM outbound call results in "An outgoing call cannot be made since the application is dispatching an input-synchronous call."

I have a COM server (C++/STA (MFC based app)) and a COM client (C#/MTA). The COM server must live in an STA, since it's an MFC app (I have no choice in this matter). The client issues a call to the server, and the server issues a callback to the…
Jörgen Sigvardsson
  • 4,839
  • 3
  • 28
  • 51
12
votes
4 answers

How do I set up my Ubuntu VPS to send outgoing mail?

My VPS provider (Slicehost) doesn't provide an SMTP server. I use Google Apps to send and receive mail for my domains, but I want to be able to programmatically send e-mail. I've been Googling this issue on and off for many months, and I just can't…
Max Cantor
  • 8,229
  • 7
  • 45
  • 59
11
votes
4 answers

Set ApartmentState for async void main

I have a Windows Forms app. Now I want to use an async method. Since C# 7.1 I can use an async Main method: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-7-1 However, now my STAThread attribute is ignored and my app runs in MTA.…
Jürgen Steinblock
  • 30,746
  • 24
  • 119
  • 189
6
votes
1 answer

MSTest setting Apartment Threading to MTA

I'm using MSTest in Visual Studio 2010 on a project that needs the apartment threading model set to MTA. I've looked online and the items I've found and tried seem to only work with Visual Studio 2008 and 2005, see…
bjwbell
  • 553
  • 1
  • 6
  • 18
5
votes
2 answers

Threading issues in C# from external process

I have this simple code: public void Run() { var invokerThread = new Thread(new ThreadStart(RunOnBackground)); invokerThread.Start(); } private void RunOnBackground() { Trace.WriteLine("hi"); ... } Unfortunately when running this code…
Aaron
  • 2,236
  • 1
  • 16
  • 28
4
votes
3 answers

What is the MIME type of .eml files in emails

I want to attach a MTA report (not delivered bounce mail) to an email, but what is the correct MIME type? I fetch the full body of the MTA report with $body = imap_fetchbody($this->Mailbox->stream, $this->header->uid, '', FT_UID); But what is the…
clarkk
  • 27,151
  • 72
  • 200
  • 340
4
votes
2 answers

Why is Task.Delay breaking the STA state of the thread?

Introduction This is a lengthy question! You will find some background on the problem at the beginning, then code samples, which have been simplified for representation and the Question after that. Please read in any order that you find good for…
ful-stackz
  • 302
  • 4
  • 10
3
votes
3 answers

Aspcompat in ASPX Page

In my aspx pages, I call a COM component that uses STA. So I use aspcompat=true parameter, but I want to understand the logic. What does it exactly do? As far as I know, in STA, it is assumed to be called only by one thread. So I should provide the…
Feyyaz
  • 3,147
  • 4
  • 35
  • 50
3
votes
0 answers

Create sendmail/dovecot email alias username for logging in CENTOS LINUX

I currently use sendmail and dovecot as a email server each user is also a username on the centos linux user accounts /etc/mail/virtusertable will contain (john is an example user) john@example.com john however how can john login using…
3
votes
0 answers

Registration-Free COM not playing nice with single threaded objects. Activation context dropped during marshaling

I'm working on integrating a COM/CLI based library into a Java based application through JNI (yeah, it's a bit of a mess). For the most part it's working, but I've hit a bit of a snag when it comes to how activation contexts interact with single…
finalman
  • 774
  • 5
  • 14
1
2 3 4 5 6 7 8