Is there any log or receipt or anything that message was sent to someone? I'm in a situation where I'm supposed to testify (= proof) that a message (confirmation) was sent from our site (using Drupal 7).

Is it possible to see it from anywhere? Does it register into hosting provider or something like that?

I tried looking at the log files on the server, but they didn't include anything regarding this message; the Drupal system log was one month ahead that time when the message was sent.

A custom message (confirmation) is sent with Rules when user makes an order and registers as user (of which all is done via customized "Add node" form).
It won't help to go back in time, but for similar requests in the future I recommend you to have a look at the Message module, which is part of the Message Stack. Read on for more details ...

Create a Message archive (audit trail)

By using the Message module, you automagically also create an archive of all Messages. Which is very handy in cases such as when a user claims to never have received some eMail. In such cases, think about how you'd proof that some eMail was mailed somewhere in the past ... as compared to using Message and just bring up that message again ...

A typical scenario (as in the question here) that would be prevented by using the Message module:


  I tried to look at the log files at server but they didn't include anything regardins this message. Also the Drupal system log was one month ahead that time when the message was sent.


Message stack

These are the basic components and dependencies of it:



For this question only the Message module would be needed (not the other Message-related modules). But first, to explain the above picture, some more details about the Message-related modules (=quotes are from the module's project page):


Message:


  The Message module is the core of the message stack. It enables logging and displaying system events in a number of different use cases. Events that are recorded over time are sometimes call activity streams. Exportable messages subtypes can be created for different use cases with custom fields and display (view) modes.

Message Notify.


  This module provides a method for sending a message via a notifier plugin. Message Notify comes with plugins for email and SMS and may be extended to other transport mechanisms as required.

Message Subscribe.


  With this module, users who subscribe to content will be notified when events occur that involve that content. The module leverages the Flag module, which provides a subscribe functionality to users.



Distributions / modules using Messages

Quite a few popular Drupal distributions already adopted to this Message Stack, Open Atrium is one of them.

A great sample of this can be found in Commerce Kickstart, which uses the Commerce Message module, to create such "Events logging". In that case in the format of an Order History, as shown in this screenprint (from this module's project page).

If you'd rather look at an existing module as an example, then checkout the 7.x-4.x version of the Answers module (disclosure: I'm a co-maintainer) and its Answers Notification sub-module. This sub-module allows logged in users to subscribe to selected questions, so that they receive notifications (using the Message Stack) when Questions receive Answers.

Combining Rules and Message

Moreover, by using the technique of Replacement tokens, it's possible to create your own Message-"tokens" using ... Rules! If these Replacement Tokens don't mean anything to you (ie you don't understand what they are really about), then head over to the answer to What's the purpose of "Replacement tokens" of a Message type? for (way) more details on that.

As an example, here is a (rather basic) custom rule:


a Rules Event like "Before saving a new node", of "After updating an existing node" (or variations of these events).
a Rules Action to "Create a message" (of a selected Message type).


That's really it ...

A really interesting facility of the Message module is its perfect integration with the Rules module. Have a look at the answer to "How to implement a follow author (or user) function?" for way more details on that.

Yet another sample that could be a perfect fit (= a quote from the question ...):


  I'm using Drupal 7 and custom message(confirmation) is sent with Rules when user has made an order and registered as user (of which all is done via customized "Add node" form).


You might be lucky

The prior quote got added to the question afterwards. And possibly explains also why you tagged your question with the drupal-commerce tag (removed in revision 3 by a mod).

So if you're lucky your site might already use the Commerce Message module, in which case you already might have such audit trail (which you don't know about). Just use Views to search what you're looking for.

If you don't use that module yet, then hurry to get it enabled for similar requests in the future.

Possible alternative for syslog

The Message module is also a possible alternative for the Syslog module (included in Drupal core). For example in situations like this one (= quote from "Syslog module overview"):


  It is not suitable for shared hosting environments.


More info about the Message module

The Message module is an amazing module, it is fully entity based, which implies that it perfectly (out of the box) integrates with modules such as Views and Rules.

Though there is not a lot of documentation about it (which is what makes it a hidden D7 gem ...). A possible way to get started with it, and to get an idea of the kind of things it can be used for, is to have a look at the answers to:


How to create a basic message - notifications system displaying a real time message counter badge?
How to show message view containing own and following activity?
How to integrate messaging into a custom module?
Is there a simple way to notify users about new posts on the site?


Tutorials:


What is Drupal's Message Stack and how do its modules work together?
How to allow users to manage their own Message Stack messages?