The simplest form of sending data by email using HTML and PHP. Mail reservation (email) Punctual send a copy to your e-mail

In Microsoft Outlook, you can specify that for all messages you send, an automatic Bcc (Bcc) will be sent to other distribution lists or users.

One scenario in which this rule is useful is when all group members reply to incoming email messages, such as Help Center. When one group member replies to a message, other group members automatically receive a copy of the reply, keeping all outgoing messages up to date.

client rules

Create a rule

Now, every time you send a message, be it a new message, forward a message or reply, people or groups that are specified in the rule will be automatically added as copy recipients. The names of people or groups do not appear in the Cc line of the compose message, but those names will appear to all recipients of the message.

Disable a rule

    In the Mail view, on the tab home click the button rules > Manage Rules and Alerts.

    On the tab in the section Rule

    Click the button OK.

Rules and Alerts.

Advice: For more information about how to quickly disable this rule for individual messages, see the next section ("").

Use a category to disable automatic CC for individual messages

If you want the flexibility to turn off automatic new copy rules based on a single message without having to navigate through the dialog box rules and alerts, you can use the categories feature in Outlook, along with a rule.


Advice:

First, you need to create a rule to automatically send blind carbon copy (CC) for all email messages you send.

This specific rule is called client rules. Client rules run only on the computer on which it is created and run only if Outlook is running. If you were to send an email using an email account on another computer, the rule would not run from that computer so that it would be generated on that computer. This same rule must be created on each computer that plans to use it.

Create a rule

Now every time you send a message, be it a new message, forward a message or reply, people or distribution lists specified in the rule will be automatically added as copy recipients. The names of people or distribution lists do not appear in the Cc line of the compose message, but those names will appear to everyone who receives the message.

Disable a rule

To prevent a copy from being sent automatically, you must first disable the rule.

    In Mail in the menu Service click the button Rules and Alerts.

    On the tab Email Rules In chapter Rule uncheck the box corresponding to the rule you created.

    Click the button OK.

    You can now send a message without automatically sending a copy to other people or mailing lists. The rule will be inactive until it is re-enabled in the dialog box Rules and Alerts.

Advice:

Use a category to disable automatic CC for individual messages

If you want to disable the new automatic Send CC rule for individual messages without calling the dialog box Rules and Alerts, you can set the rule to a category that is available in Office Outlook 2007.

Modify the rule you created earlier so that when you add the specified category to a message, the rule does not automatically send a copy.

Whenever you want to disable the auto-cc rule for a message, apply a category to it.

Advice: You can use a keyboard shortcut if you specified it when creating the category.

When you send a message, the auto-copy rule will not apply.

One of the most popular functions on the site is the application or order form, the data from which is sent by email to the site owner. As a rule, such forms are simple and consist of two or three fields for data entry. How to create such an order form? This requires the use of HTML markup language and PHP programming language.

The HTML markup language itself is simple; you just need to figure out how and where to put certain tags. With the PHP programming language, things are a little more complicated.

For a programmer, creating such a form is not difficult, but for an HTML layout designer, some actions may seem difficult.

Create a data submission form in html

The first line will be as follows

This is a very important element of the form. In it we indicate how the data will be transferred and to which file. In this case, everything is transferred using the POST method to the send.php file. The program in this file must accordingly receive the data, it will be contained in the post array, and send it to the specified email address.

Let's get back to form. The second line will contain a field for entering your full name. Has the following code:

The form type is text, that is, the user will be able to enter or copy text here from the keyboard. The name parameter contains the name of the form. In this case, it is fio; it is under this name that everything that the user entered in this field will be transmitted. The placeholder parameter specifies what will be written in this field as an explanation.

Next line:

Here, almost everything is the same, but the name for the field is email, and the explanation is that the user enters his email address in this form.

The next line will be the "send" button:

And the last line in the form will be the tag

Now let's put everything together.





Now let's make the fields in the form mandatory. We have the following code:





Create a file that accepts data from the HTML form

This will be a file called send.php

In the file, at the first stage, you need to accept data from the post array. To do this, we create two variables:

$fio = $_POST["fio"];
$email = $_POST["email"];

Variable names in PHP are preceded by a $ sign, and a semicolon is placed at the end of each line. $_POST is an array into which data from the form is sent. In the html form, the sending method is specified as method="post". So, two variables from the html form are accepted. To protect your site, you need to pass these variables through several filters - php functions.

The first function will convert all the characters that the user will try to add to the form:

In this case, new variables are not created in php, but existing ones are used. What the filter will do is transform the character "<" в "<". Также он поступить с другими символами, встречающимися в html коде.

The second function decodes the URL if the user tries to add it to the form.

$fio = urldecode($fio);
$email = urldecode($email);

With the third function we will remove spaces from the beginning and end of the line, if any:

$fio = trim($fio);
$email = trim($email);

There are other functions that allow you to filter php variables. Their use depends on how concerned you are that an attacker will try to add program code to this html email submission form.

Validation of data transferred from HTML form to PHP file

In order to check whether this code works and whether data is being transferred, you can simply display it on the screen using the echo function:

echo $fio;
echo "
";
echo $email;

The second line here is needed to separate the output of php variables into different lines.

Sending received data from an HTML form to email using PHP

To send data by email, you need to use the mail function in PHP.

mail("to which address to send", "subject of the letter", "Message (body of the letter)","From: from which email the letter is sent \r\n");

For example, you need to send data to the email of the site owner or manager [email protected].

The subject of the letter should be clear, and the message of the letter should contain what the user specified in the HTML form.

mail(" [email protected]", "Application from the site", "Full name:".$fio.". E-mail: ".$email ,"From: [email protected]\r\n");

It is necessary to add a condition that will check whether the form was sent using PHP to the specified email address.

if (mail(" [email protected]", "Order from the site", "Full name:".$fio.". E-mail: ".$email ,"From: [email protected]\r\n"))
{
echo "message sent successfully";
) else (
}

Thus, the program code of the send.php file, which will send the HTML form data to email, will look like this:

$fio = $_POST["fio"];
$email = $_POST["email"];
$fio = htmlspecialchars($fio);
$email = htmlspecialchars($email);
$fio = urldecode($fio);
$email = urldecode($email);
$fio = trim($fio);
$email = trim($email);
//echo $fio;
//echo "
";
//echo $email;
if (mail(" [email protected]", "Application from the site", "Full name:".$fio.". E-mail: ".$email ,"From: [email protected]\r\n"))
( echo "message sent successfully";
) else (
echo "errors occurred while sending the message";
}?>

Three lines to check whether the data is being transferred to the file are commented out. If necessary, they can be removed, since they were needed only for debugging.

We place the HTML and PHP code for submitting the form in one file

In the comments to this article, many people ask the question of how to make sure that both the HTML form and the PHP code for sending data to email are in one file, and not two.

To implement this work, you need to place the HTML code of the form in the send.php file and add a condition that will check for the presence of variables in the POST array (this array is sent from the form). That is, if the variables in the array do not exist, then you need to show the user the form. Otherwise, you need to receive data from the array and send it to the recipient.

Let's see how to change the PHP code in the send.php file:



Application form from the site


//check if variables exist in the POST array
if(!isset($_POST["fio"]) and !isset($_POST["email"]))(
?>





) else (
//show the form
$fio = $_POST["fio"];
$email = $_POST["email"];
$fio = htmlspecialchars($fio);
$email = htmlspecialchars($email);
$fio = urldecode($fio);
$email = urldecode($email);
$fio = trim($fio);
$email = trim($email);
if (mail(" [email protected]", "Application from the site", "Full name:".$fio.". E-mail: ".$email ,"From: [email protected]\r\n"))(
echo "Message sent successfully";
) else (
echo "Errors occurred while sending the message";
}
}
?>



We check the existence of a variable in the POST array with the isset() PHP function. An exclamation mark before this function in a condition means negation. That is, if the variable does not exist, then we need to show our form. If I hadn’t put the exclamation point, the condition would literally mean “if exists, then show the form.” And this is wrong in our case. Naturally, you can rename it to index.php. If you rename the file, do not forget to rename the file name in the line

. The form should link to the same page, for example index.php. I added the page title to the code.

Common errors that occur when submitting a PHP form from a website

The first, probably the most popular mistake, is when you see a blank white page with no messages. This means that you made an error in the page code. You need to enable display of all errors in PHP and then you will see where the error was made. Add to the code:

ini_set("display_errors","On");
error_reporting("E_ALL");

The send.php file must only be run on the server, otherwise the code simply will not work. It is advisable that this is not a local server, since it is not always configured to send data to an external mail server. If you run the code not on the server, then the PHP code will be displayed directly on the page.

Thus, for correct operation, I recommend placing the send.php file on the site hosting. As a rule, everything is already configured there.

Another common mistake is when the “Message sent successfully” notification appears, but the letter does not arrive in the mail. In this case, you need to carefully check the line:

if (mail(" [email protected]", "Order from the site", "Full name:".$fio.". E-mail: ".$email ,"From: [email protected]\r\n"))

Instead of [email protected] there must be an email address to which the letter should be sent, but instead[email protected] must be an existing email for this site. For example, for a website this will be . Only in this case a letter with the data from the form will be sent.

Today, almost every person has an email, or even several. However, quite often e-mail contains a large amount of important information. And losing it can be worse than taking and formatting your computer's hard drive. Therefore, taking care of creating backup copies, so-called backups, of your mail is no less important than backing up your documents. But her solution is not as trivial as copying files from one location to another. Even if you find the email program files that contain all your emails, it will be difficult for you to do anything with them. Try to answer yourself a few questions: “how will you restore letters?”, “how will you view one of the letters?”, “how are you going to look for the letter you need in the backup copy?” etc. There is no clear answer to almost all questions, or it will be so complicated that you will quickly give up on it.

The class of utilities discussed in this review will allow you not only to save your precious emails in a safe place, but also to perform simple operations with them, such as viewing, searching, etc.

Review of free programs for creating mail backups

MaiStore Home is a powerful mail backup tool

Allows you to create backup copies of all email messages from various applications and online services, and store them in one secure archive. The utility really knows how to work with huge sizes. This is easy to feel; just try to look for something, and you will see that the speed is simply amazing. It falls into the category of “set it up once and use it.” The utility has a fairly flexible interface for configuring recovery from a backup copy. So you can always quickly restore everything you need. Always remember that the utility does not create backup copies of account and contact settings, although you can always restore the latter from emails.

Can create backup copies:

  • Microsoft Outlook 2000, XP, 2003, 2007, 2010, 2013
  • Outlook Express, Windows Mail and Windows Live Mail
  • Microsoft Exchange Server 2003, 2007, 2010, 2013
  • Mozilla Thunderbird and SeaMonkey
  • POP3 and IMAP (including webmail services such as Gmail and Yahoo)
  • Microsoft Office 365 (Exchange Online)
  • .eml and other files

For products of this kind, MailStore is updated quite often. This gives you confidence that in a year you won’t have to look for a suitable utility again and set everything up again. The user interface is a bit angular in some areas. But, nevertheless, the utility is quite easy and simple to use. You can read emails directly from the backup, and it will be as easy as if you read them from email clients. You can even reply to messages directly from MailStore. We can say that this program is suitable for users of any level.

KLS Mail Backup is a simple and high-quality program for creating mail backups

This is a simple and high-quality utility designed to create email backups of many popular email clients. It also allows you to backup profiles of various Internet programs. The utility uses the well-known Zip format to compress and store electronic messages. So you can always access your messages directly. The processes for creating and restoring backups are presented with special setup wizards. Even the most inexperienced user can quickly figure out what's what and start using it. KLS Mail Backup is free for personal use only.

KLS Mail Backup cannot work with the POP and IMAP protocols. This means that you will not be able to backup your mail directly from the server.

Various products for creating backups...

MozBackup is a utility for creating backup copies of the following programs: MozSuite/SeaMonkey, Mozilla Firefox, Mozilla Thunderbird, Netscape, Flock, Sunbird, Spicebird, PostBox and Wyzo. It saves mail, bookmarks, address books, passwords, etc.

Comodo Backup is a general purpose backup utility that also allows you to create email backups. You are also offered 5 GB of online storage for free. Comodo operates from customers who use online storage on a commercial basis. It supports Thunderbird, Microsoft Outlook, Windows Live Mail and OutLook Express. It also allows you to create backup copies of files and folders.

MailBrowserBackup is a simple portable program that detects and suggests backing up Internet Explorer, Mozilla Firefox (profile), Flock, Windows Mail, Windows Contacts (Win 7), Windows Live Mail, Mozilla Thunderbird, Opera (browser and mail), Apple Safari , Google Chrome, SRWare Iron, FileZilla FTP client and Windows Live Messenger Plus.

In Windows 7, you will need to run the program as an administrator or the account associated with Windows Contacts, otherwise the utility will not be able to create a backup for it.

Microsoft provides a free backup program for Outlook that backs up your pst files. Works with Outlook 2002 and later.

Gmail Backup (site no longer available) is an open source solution that allows you to create backup copies of your emails using the IMAP protocol.

Quick selection guide (links to download free programs for creating mail backups)

MailStore Home

Backup all emails from multiple apps and accounts. Quick search. Ease of working with backups. Backup via POP3 and IMAP protocols (including webmails such as Gmail and Yahoo! Mail). Very easy to use.
Requires Microsoft .NET.
-------------
http://www.mailstore.com/en/mailstore-home-email-archiving.aspx
5.5 MB 8.1 Free for private use only Windows 2000 / XP / Vista / 7 / 8

KLS Mail Backup

Many popular email clients. A clear and simple tool for creating backups. Uses zip archives to store your mail, so you always have direct access to your emails.
Does not support POP and IMAP protocols. This means that you cannot create backups directly from the mail server.

“It’s like the fairy tale about the boy who constantly cried wolf.” If you abuse the “urgent” tag, people will stop answering your emails. And a truly important letter may go unnoticed because of this.

Familiarity

Yes, the tone of your letter can reflect your relationship with the recipient. However, you may be considered unprofessional if you allow yourself to be too informal in your correspondence. Avoid excessive use of exclamation marks, emoticons, colored text, unusual fonts, and excessive brevity of messages.

Be especially careful if you work with people of different ages, with language barriers, or with those who prefer a more traditional form of communication.

Too dry tone

At the same time, being a robot is also not worth it. It's okay if you show your character or enthusiasm in your letters - within reasonable limits.

Reply All

Work email is not for entertainment, but for communication. So if you're replying to an email sent to a group of people, think twice before clicking "reply all." To do this, your answer must be extremely important to everyone.

Sending copies without permission

Sharing other people's information with others is, to say the least, impermissible. It doesn't matter whether you send a client a copy of a letter from your boss who responded to him in any way, or include one employee in personal correspondence with another. Few people might like it if you send a copy of a letter without their consent.

Send BCC

Sending BCC breeds mistrust. If you want to send a letter to someone, and this person, in theory, should not participate in work correspondence, copy the text and send it as a separate letter.

Unspecified email subject

Subjects like “It’s Me,” “Hello,” or “FYI” (FYI) simply don’t grab attention. The person will not understand what is being said and will not want to respond to the letter. Work-related letters should be clear and concise. The recipient is more likely to open the email if he understands what you want from him.

Sending too many personal emails

You can sometimes use jokes, touching stories and motivational quotes to cheer someone up. But people get tired of this quickly, no matter what your intentions were in writing them. If you send too many personal emails, they will simply be set to auto-deletion.

Be rude

You shouldn’t send letters full of poison, because people will remember it when the opportunity arises. Instead, write a letter and leave it in “Drafts” for two days. Then you can come back to it and edit it, removing the barbs. This way you will achieve what you want faster. In addition, you will be treated as a very patient and thoughtful professional.

Stupid email address

If you are sending an email to a client, employee, or potential employer, do not use email with an “unprofessional” title. If there is anything in the email title that purports to be witty or contains sexual or vulgar connotations (something like ), you run the risk of making the other person feel negative about you from the very beginning. Create a separate email for purely professional needs.

Typos

The fact that the email was sent from an iPhone is not an excuse for sending sloppy emails. If you make more than one mistake in your letter, it may be considered unprofessional. If this is a very important letter, and you are in a hurry to get somewhere, then try to at least check it before sending it.

Sending emails early in the morning

Most people, when receiving letters, look at the time they were sent. If the letter is sent too early, you may be viewed negatively. At the very least, you will be considered a workaholic with no personal life. It's worse if you are considered intrusive. If inspiration awakens you at night, write a letter, save it in “Drafts” and send it during working hours.

Too many punctuation marks

People sometimes get too carried away and use a lot of exclamation points. The result may seem immature or too emotional to some. Don't abuse it!!!

Non-professional fonts

The Purple Comic Sans font has its own scope. In business, it is better to use classic fonts, colors and sizes. Your letters should be easy to read.

Typically a font size of 10 or 12 is used. Easy-to-read fonts like Arial, Calibri or Times New Roman are best for the job. Preferable color is black.

Letter too long

Most people spend seconds, not minutes, reading emails. Many people simply skim over the text with their eyes, so write your letters based on this. People find it difficult to read large paragraphs - break the text into smaller blocks. Highlights and bulleted lists are much easier to read. You can also highlight the main points in bold or italics, but do not do this often.

Did you like the article? Share with friends: