Profile Picture

IMailAPI_NET for extreme newbie

Posted By Jim In Florida 3 Years Ago
You don't have permission to rate!
Author
Message
Jim In Florida
Posted 3 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 1, Visits: 5
I am trying to write a windows service that will download emails from IMail so they can be processed for our business purposes.  I found IMailAPI_NET and am hoping it is the tool I need.

Forgive my ignorance, but here are a few questions:
1. Is any application that uses IMailAPI_NET meant to run on the same server as IMail?
2. Is it possible to run my service on another machine besides the one hosting IMail?
3. If (1) is true, must I have a local copy of IMail running on my machine for development purposes?  
4. Am I totally off base and should consider something else?

Thanks,
Jim
Mike R.
Posted 3 Years Ago
View Quick Profile
Time Traveler

Time Traveler (1.7K reputation)Time Traveler (1.7K reputation)Time Traveler (1.7K reputation)Time Traveler (1.7K reputation)Time Traveler (1.7K reputation)Time Traveler (1.7K reputation)Time Traveler (1.7K reputation)Time Traveler (1.7K reputation)Time Traveler (1.7K reputation)

Group: Administrators
Last Active: 2 Years Ago
Posts: 1.1K, Visits: 1.8K
1. Is any application that uses IMailAPI_NET meant to run on the same server as IMail?
   Yes it is meant to run on the same server because the API directly accesses mailbox files and other resources.  The only way to do it remotely is to create a web based application.
2. Is it possible to run my service on another machine besides the one hosting IMail?
   Yes, but you would have to connect to another "service" that you wrote that is using the api, otherwise just use POP, IMap, or SMTP to get/send email.
3. If (1) is true, must I have a local copy of IMail running on my machine for development purposes?
   Yes.
4. Am I totally off base and should consider something else?
   No, those were sound questions.

Mike R.
Ipswitch IMail
http://support.ipswitch.com
Visit and see our new knowledgebase!
Mike Barber
Posted 3 Years Ago
View Quick Profile
Time Traveler

Time Traveler (666 reputation)Time Traveler (666 reputation)Time Traveler (666 reputation)Time Traveler (666 reputation)Time Traveler (666 reputation)Time Traveler (666 reputation)Time Traveler (666 reputation)Time Traveler (666 reputation)Time Traveler (666 reputation)

Group: Administrators
Last Active: 2 Months Ago
Posts: 480, Visits: 19.4K
If you are wanting to access emails for a user account then the Framework API is probably going to be much more suited to your needs.

API Documentation can be found here.
http://docs.ipswitch.com/_Messaging/IMailServer/v12.5.3/api/

Add references to
Ipswitch.Messaging.Framework.dll
Ipswitch.Messaging.Framework.TransferEncoding.dll


using Ipswitch.Messaging.Framework;
using Ipswitch.Messaging.Framework.Mail;

namespace Test
{
class Program
{
static void Main(string[] args)
{
MessagingSystem ms = new MessagingSystem();
Host host = ms.Hosts.GetPrimaryHost();
User user = host.Users.Get("admin");

using (EmailFolder inbox = user.Folders.Get<EmailFolder>("Inbox"))
{
foreach (Email message in inbox.Items)
{
using (message)
{
Console.WriteLine(message.From.ToString());
Console.WriteLine(message.To.ToString());
Console.WriteLine(message.Subject);
Console.WriteLine(message.Body.Plain);
Console.WriteLine(message.Body.Html);
}
}
}
}
}
}



Mike Barber
Senior Software Developer
Ipswitch, Inc
Edited
3 Years Ago by Mike Barber


Similar Topics


Reading This Topic