[Osaka/Yokohama] Looking for infrastructure/server side engineers!

[Osaka/Yokohama] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

1つのメールアドレスから複数のメールアドレスを簡単に用意する!Gmailの便利な使い方

こんにちは。
開発チームのスマホ担当、のむしんです。

アプリ/システム開発をおこなっていると、テスト用に複数のメールアドレスが必要になることがありますよね?

お手軽に捨てアドを作ってくれるサービスなんかもありますが、
今回はGmailを使って、1つのアドレスから複数のアドレスを簡単に用意するチョイ技をご紹介します。

特に新しい手法というわけではないのですが、知らなかった方はぜひ使ってみてください。

 

用意するもの

・Gmailアドレス ×1

はい。これだけです!

今回は「[email protected]」を使って説明します。
このアドレス宛に送ると実際にのむしん宛に届きますが、いたずらメールはご遠慮くださいませ。

 

方法その1:@googlemail.com

Gmailのアドレスは「[email protected]」ですが、実は「googlemail.com」でも届きます

「nomyukibeyond@googlemail.com」宛に送ると、「[email protected]」に届くということです。

これで1つのメールアドレスが2つに増えました!

 

方法その2:ピリオド増殖法

Gmailでは@より前のピリオド(ドットとも言います)は無視されます

つまりどういうことかというと、以下のアドレス宛に送ったメールは全て「[email protected]」に届きます。

  • nomyuki.beyond@gmail.com
  • nom.yuki.beyond@gmail.com
  • n.o.m.y.u.k.i.b.e.y.o.n.d@gmail.com

ただしドットを2つ以上連続して付けたり、@の直前にドットをつけることはできません。
[email protected]」や「[email protected]」はダメということです。

もっともこれはGmailの制約ではなく、メールアドレスの一般的なルール(RFC)として決められていることですのでご注意を。

この方法を使えばかなりのメールアドレスを生み出すことができるはず…!

このピリオドに関する記述はGmailヘルプにも記載がありますね。

 

方法その3:プラス追記法(エイリアス)

ドットを追加してメールアドレスを増やせるとしても限度があるじゃないか!
・・・という方の為に、最後の方法を伝授します。

やり方はアカウントの後ろに「+(プラス)と任意の文字列」を追加するだけです。

例えば「nomyukibeyond+nomurahaimatotemonemui.zzz@gmail.com」なんてアドレスを宛先に指定した場合でも「[email protected]」に届いてしまいます。

追加したワードを深く追求してはいけません。
…いけません。

この方法なら無限にメールアドレスを生み出すことができます。

この+を用いたアカウントの拡張はGmailのエイリアスという機能で、メールを分類しやすくしたりするためにアドレスにカテゴリを追加するためのものです。

 

ちなみにここまでで紹介した方法1~3は組み合わせて使うことも可能です。
「n.o.m.y.u.k.i.b.e.y.o.n.d+nomurahaimatotemonemui.zzz@googlemail.com」もちゃんと届きます。
…だいぶ鬱陶しいですね。

 

おまけ:メールアドレスのルールについて

メールアドレスに+(プラス)なんて使っていいの?と思う方もいるかもしれません。
方法その2でチラッと出てきたRFCの定義に基づけば「使ってOK」です。

RFCの原文は長大なのでウィキぺディアの記述をお借りすると、RFCで定義されているメールに使用できる文字は以下の通りです。

・大小のラテン文字(本来は大文字・小文字は区別されるが、実際には区別されていない実装がほとんどである。一般的には小文字で表記される)

・数字

! # $ % & ' * + - / = ? ^ _ ` { | } ~(実際には、プロバイダ側で利用可能な記号文字を一部のみに制限している場合が多い)

・ピリオド(.)(先頭と末尾以外で使用可能。2個以上連続してはならない)

大小のラテン文字(アルファベット文字)の注記にある大文字・小文字について、これはGmailでも区別されていないようです。
従って「nomyukiBEYOND@gmail.com」宛に送ってもやはり「[email protected]」に届きます。

また、使える記号が意外と多いですね。
ただ注記されているように、RFCの定義的にはOKでも実際にメールの送受信を担っているプロバイダ側で制限されている場合も多いので、実際のメールアドレスに使用するのは- _ .くらいに留めておくのがいいかもしれません。

 

まとめ

どうでしょう。今回紹介した方法を全部知っていたという人はGmail通ですね?
Gmailは掘り下げると色々と便利な機能が見つかります。
普通のプロバイダメールと同じ使い方だけでは勿体ないですよ!
興味を持った方は調べてみると面白いかもしれません。

最後に

私が所属するシステム開発のサービスサイト「SEKARAKU Lab(セカラク ラボ)」を開設しました。
ビヨンドは、サーバーの設計・構築から運用までをワンストップでお任せいただけますので、サーバーサイド開発でお困りの方はお気軽にお問い合わせください。
SEKARAKU Lab:https://sekarakulab.beyondjapan.com/

それではまた!

この記事がお役に立てば【 いいね 】のご協力をお願いいたします!
3
読み込み中...
3 票, 平均: 1.00 / 13
30,240
X facebook はてなブックマーク pocket
[2024.6.30 CentOS support ended] CentOS server migration solution

[2024.6.30 CentOS support ended] CentOS server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

The person who wrote this article

About the author

Yuki Nomura

After graduating from university, he worked on electronic medical record development at a local system development company.
After that, he moved to a mobile app development company and gained experience developing apps for flip phones and smartphones, before joining Beyond in 2013.
He works in the Osaka office. He is currently in charge of designing and developing web systems.
He continues to develop smartphone apps in his private life as a hobby.
He is a mechanic who is a hardware geek. Leave the assembly of computers and bicycles to us!