I would like to know if it's possible to use SMTP protocol to receive emails. In other words I'm not able to use IMAP or POP protocols because of some internal regulations of a company. If it's possible, could someone give me some example of how to do it? If not, is there a way to implement email receiver using other technologies? Thank you
Yes, this is possible. In fact, the SMTP protocol was designed explicitly for the purpose of sending and receiving emails. The wikipedia page has some examples of email sent using the SMTP protocol: https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
If you are looking for source code to use as an example, I suggest trying GitHub: there are lots of SMTP projects in a variety of languages.
If you just need a working implementation, Microsoft Exchange is very popular. There are also popular open source projects like Postfix, which you can download for free.
Related
I can send mail using SmtpClient class, but are there any classes that allow reading mails? I tried to find something out, but it wasn't sucsessfull.
Maybe others can correct me but SmtpClient class is C# and not C++ right?
I don't know how up-to-date it is but here is EmailArchitect's tutorial for "Retrieve Email and Parse Email in C++/CLI/CLR. It looks like it uses EmailArchitect's binary so it's unfortunate but it could be a paid route.
Another way could be researching the libcurl/curl/cURL route which supports multiple protocols and have many examples online (though I haven't checked them out myself).
I am automating an application using selenium webdriver which sends the email alerts on clicking on a particular button. So I need a dedicated email system which will receive the emails and we can use its APis or some other feature which can be used to verify whether the mail was actually sent and we can also verify the mail content.
You can use Mailinator service, it is free if you just want to navigate the emails. However it also provides the API for dev purposes but its paid.
I'd recommend GreenMail:
GreenMail is an open source, intuitive and easy-to-use test suite of
email servers for testing purposes.
Typical use cases include mail integration testing or a lightweight
sand boxed mail server for development.
Supports SMTP, POP3 and IMAP including SSL
Prevents accidental email leaking to real mail servers
Provides different deployment models,
such as WAR module or JBoss GreenMail Service
Easily embeddable in JUnit tests for integration testing
Lightweight with few dependencies
GreenMail is the first and only library that offers a test framework
for both receiving and retrieving emails from Java.
I did a bit R&D and found a solution. The solution is using the Gmail API.
Below is a link for more description and clarification-
EMAIL VERIFICATION FROM GMAIL ACCOUNT IN SELENIUM WEBDRIVER (JAVA)
This looks like a good solution, But I am still looking for the best approach.
Kindly let me know if a dedication email platform really exist for testing purpose.
Looking for ideas on how to implement a kiosk style/full screen client that will display messages sent to it, in realtime or push based. Basically, think a 911 dispatch center call board. I was thinking a xmpp bot to display, and making a simple xmpp client that can only send messages to the bot.
This is for a very small emergency disaster agencies war room, and only needs to be able to display simple messages entered in from one of the computers in the building. Is XMPP a good solution for this?
An IM protocol like XMPP is an acceptable solution for this.
XMPP seems to fit the bill, it is mature and has many clients that support it so it would not be necessary to write a client, just set up a regular IM client to send to the "buddy" that is the big board.
Are you looking at the problem backwards? Describe what you want to do a little more THEN seek advice on protocols. It smells like you might be designing around a protocol rather than designing around your requirements.
This should be as simple as a single HTML page, running full screen, using Strophe.js and an XMPP account. Strophe is an easy-to-use XMPP library in Javascript.
Something like the basic.{html,js} example here should be pretty much what you want:
http://code.stanziq.com/cgit/strophe/strophejs/tree/
Sounds like a simple pubsub setup (XMPP will work for this) where the clients are all publishers and the War room is the only subscriber. This eliminates the need for rosters so it keeps the intial configuration pretty simple.
I don't know what language you prefer to use, but it would be rather simple in Smack using the pubsub API and any XMPP server you prefer that supports the pubsub extension. (You will need to build Smack from source though as that particular API is new and not in the release version yet.)
I need to write an application that can read email and attachments from a mailbox in Exchange 2007. What is the best way to do this? Outlook Redemption works, but is there a better way?
You could simply us POP3 or IMAP to access the mails on the Exchange server.
Depending on your environment you would probably find libraries that provide POP3 or IMAP implementation.
There are several ways to do this. Starting from POP3 or IMAP (as indicated by Dominik) to more powerful options such as the ones listed at Exchange Development Technologies.
I would avoid starting new developments with APIs that are being phased out by Microsoft, so you may want to take a look at the Exchange Server 2010's version of the article above.
A safe bet would be to use Exchange Web Services (a.k.a EWS). You should be able to program against it using any language capable of doing SOAP Web Services.
If you are programming against .Net Framework 3.5 or above and Exchange Server 2007 SP1 or above, you can use EWS Managed API which is the client-side API for EWS and offers a much cleaner experience than the one provided by auto-generated web service proxies (via Add Web Reference menu item).
Use Microsoft Exchange Server MAPI Editor (MFCMAPI) which is a great tool to retrieve MSG (or EML) files.
I personally use the cfexchangeConnection in coldfusion to reach out to mailboxes (as well as all other items in exchange)
My professor in the uni has asked me to design a simple website with a basic feedback form.
the form should NOT use 'mailto' for sending the feedback form e-mail
the form should NOT use server-side scripting (PHP, etc) for sending the feedback form e-mail.
Is is possible at all to send an e-mail from a website form without using any of these 2 options? Is there yet another option for sending an e-mail in this situation?
You could embed a Java applet or ActiveX control which does it for you.
No. The client-server model used by HTTP has the client and the server, both of which the professor has disallowed you to use. (Email does not use HTTP, but it's apparent in your question that you need to send mail from an HTTP context, and you need a computer on which to do that.)
I am not aware of a solution without using any of these 2 options.
Mybe your professor only doesn't whant that you scipt a solution. I guess there are plenty of feedback solutions as services on the web. Most web hoster also have a mail cgi script or something like this installed...
The professor agreed, that any of the following 4 technologies can be used for this project:
Java applet
ActiveX component
Javascript
Flash (Actionscript).
Many thanks for the help.
(How exactly sending an e-mail is going to be achieved with these technologies without referencing i.e. 'mailto' in Javascript or in the flash application or without referencing the server is going to be the strange part of this coding though).