1
00:00:01,410 --> 00:00:06,720
So this is just a quick note about sending mail once you've deployed the application to the live server,

2
00:00:07,350 --> 00:00:12,710
unless you have mail hogge installed on that server, mail is not going to go anywhere.

3
00:00:12,720 --> 00:00:19,530
And that's because here in the send mail go file, which is in the command web folder, under this function,

4
00:00:19,530 --> 00:00:24,480
send message, we've hardcoded, coded our server, host our server port, all those things.

5
00:00:24,810 --> 00:00:29,490
And if you actually want to send live mail, you're going to have to change those values.

6
00:00:29,520 --> 00:00:35,200
Now you can if you wish, and it's appropriate for your circumstances, actually hard, cold, that

7
00:00:35,220 --> 00:00:36,750
hard coded information right.

8
00:00:36,750 --> 00:00:42,450
In this function, it's probably a better idea just to add a couple of command line parameters and you're

9
00:00:42,450 --> 00:00:50,070
probably going to need the mail host the mail port, whether or not it uses SSL, that sort of thing,

10
00:00:50,070 --> 00:00:54,300
all the things necessary to send email using whatever your email server is.

11
00:00:54,690 --> 00:00:59,970
Now, I'm not going to do that just because well, I don't have any idea what your mail server, your

12
00:00:59,970 --> 00:01:01,470
outgoing mail server might be.

13
00:01:01,680 --> 00:01:08,460
I tend to use mail gun, dot com or just because it's a really good service and it's very, very inexpensive.

14
00:01:08,580 --> 00:01:12,390
I can send 10000 messages a month for less than five dollars.

15
00:01:12,870 --> 00:01:17,640
But whatever your settings might be, you can either hardcoded them in here or I think a better approach

16
00:01:17,640 --> 00:01:22,560
would be to just add some command line flags to your application and pick up that information at the

17
00:01:22,560 --> 00:01:24,350
point that you start your application.

18
00:01:24,630 --> 00:01:26,460
That's entirely up to you.
