I want to get mail messages sort by date and paging.I use javamail imap.Is it has api to do that sort in server not in client?
I found roundcubemail can do this.
Any suggestion?thank advanced.
It depends on whether or not the server supports the IMAP SORT extension. If it does, you can use the IMAPFolder.getSortedMessages method to get the Message objects sorted appropriately. You can then fetch the data for the messages in whatever groups/pages you like.
Related
I need to be able to access a log of all SMS that were sent. Is there a way to do this via their HTTP API? I haven't had much luck finding anything that reference this in their docs.
There is a feature called 'callbacks' that can send an HTTP request to your server for every message you send. It will give you status updates about the message and the message charge. This allows you to build up whatever form of custom reporting that you may want.
https://www.clickatell.com/developers/api-docs/callback-(push-status-and-cost-notification)-advanced-message-send/
You send your message with the callback parameter... And you specify your URL to receive callbacks on your API connection on the website.
Unfortunately, you can't access reporting features like that via API. You need to log in to your central dashboard to get that information.
You can, however, query the message status if you have the message ID, but I don't think that's quite what you're looking for.
(Disclosure: I work for Clickatell)
I'm working with actionmailer. I'm trying to send a mail from email_idA to email_idB, then fetch that email from email_idB, and do some string operations on it to look for specific keywords.
I understood how to send the email. But how do I receive that email from email_idB's inbox? What configurations do I need to do? And how do I extract the email body as plain text?
Did you mean fetch or receive ? Your question uses both these terms and not sure what you mean.
If you just want to do a keyword search on the mails you sent, why not store the outgoing mail in DB and do the search ? (as you said "somehow fetch that email")
To be able to receive emails in your rails app, you would need to implement the receive method in your mailer. Follow this link - link
If you meant fetching emails from your inbox then you have to use POP3. Follow this SO answer - link
Im not sure whats your requirement but I'm sure you will find the above links useful :)
Hi I am using the bellow function, can you please guide me how can I use Mail::failures(); in it
Mail::send('emails.caregiversetprimary', $templateArray, function($message)use($email)
{
$message->to($email, 'username')->subject('my subject');
});
Mail::failures(); < ====== this gives me black array as I have used wrong email
I am using laravel 4.1
tl;dr
You can know which recipients the email has been sent to but no which recipients have received it.
details
You need a better understanding of how mail servers work. From a Laravel point of view, there is no way (or at least not a simple one*) of knowing which recipients got the email. Its a matter of how mail protocol works. You may know which recipients the message has been sent to but no which recipients actually got it.
With Mail::failures() you get a list of recipients to which Laravel tried to send the email but it failed on actually sending it. But again, if it has been sent there is no straightforward way to known if the mail reached their inbox or no.
*If you happend to use Mailgun, Mandrill or any other 3rd party software then you are not dealing with a mail server 'per se' but with an API service. May be you could check the mail service provider documentation to research if they perform any kind of delivery tracking that you can programatically check.
I m implementing Pub/Sub model using JMS. I send a message from Pub to all Subscribers. I want that subscribers should get filtered messages based on some string in actual message body.
For example a subscriber subscribe to a topic 'sports' and should receive only those posts which has keyword 'cricket' in it in the message text body.
p.s. I dont want to use message selectors.
How can I implement this.
Thanks and Regards.
Take a look at apache camel. It provides a means of routing and filtering messages and has excellent integration with Active MQ.
You can use no mechanism for filtering messages on a topic based on the Message Body contents. Usually a JMS Selector is used for filtering messages but even this does not work for Body Contents:
From The Java EE 6 Tutorial:
A
message selector cannot select messages on the basis of the content of the message body..
The issue here is that you have to first receive (that is consume) the message and then extract its contents which precludes the case of any kind of Body filtering.
You cannot do that with JMS itself.
What you typically do is to make the sending application use different queues depending on message type (orders, customer prospects, invoices, status reports or whatnot). If you don't want to use separate queues, you can at least make the sending application mark the message with some property that you can filter on using a selector.
In some cases, where you still need to do routing and/or filtering based on the actual content of a message, there are tailor made software for that kind of thing. Apache Camel and Mule ESB are two options.
I m implementing Pub/Sub model using JMS. I send a message from Pub to all Subscribers. I want that subscribers should get filtered messages based on some string in actual message body.
For example a subscriber subscribe to a topic 'sports' and should receive only those posts which has keyword 'cricket' in it in the message text body.
p.s. I dont want to use message selectors.
How can I implement this.
Thanks and Regards.
Take a look at apache camel. It provides a means of routing and filtering messages and has excellent integration with Active MQ.
You can use no mechanism for filtering messages on a topic based on the Message Body contents. Usually a JMS Selector is used for filtering messages but even this does not work for Body Contents:
From The Java EE 6 Tutorial:
A
message selector cannot select messages on the basis of the content of the message body..
The issue here is that you have to first receive (that is consume) the message and then extract its contents which precludes the case of any kind of Body filtering.
You cannot do that with JMS itself.
What you typically do is to make the sending application use different queues depending on message type (orders, customer prospects, invoices, status reports or whatnot). If you don't want to use separate queues, you can at least make the sending application mark the message with some property that you can filter on using a selector.
In some cases, where you still need to do routing and/or filtering based on the actual content of a message, there are tailor made software for that kind of thing. Apache Camel and Mule ESB are two options.