@@ -41,46 +41,57 @@ from notify_mi import notify
41
41
``` python
42
42
# send only a text message
43
43
# include phone_number and phone_provider (see providers list below)
44
+ # phone number: "(619) 123-4567", "619-123-4567", or "6191234567" (all acceptable)
44
45
notify.send_message(" Hello World!" ,
45
- (" gmail" , " password" ),
46
- phone_number = " your_number" ,
47
- phone_provider = " your_phone_provider" )
46
+ (" gmail" , " password" ),
47
+ phone_number = " your_number" ,
48
+ phone_provider = " your_phone_provider" )
48
49
```
49
50
50
51
###### Text + Email
51
52
``` python
52
53
# send text message + email
53
54
# include phone_number, phone_provider (see providers list below), and receiver email
55
+ # phone number: "(619) 123-4567", "619-123-4567", or "6191234567" (all acceptable)
54
56
notify.send_message(" Hello World!" ,
55
- (" gmail" , " password" ),
56
- phone_number = " your_number" ,
57
- phone_provider = " your_phone_provider" ,
58
- send_to = " email@gmail.com" )
57
+ (" gmail" , " password" ),
58
+ phone_number = " your_number" ,
59
+ phone_provider = " your_phone_provider" ,
60
+ send_to = " email@gmail.com" )
59
61
```
60
62
61
63
###### Email Only
62
64
``` python
63
65
# send only email
64
66
# include receiver email
65
67
notify.send_message(" Hello World!" ,
66
- (" gmail" , " password" ),
67
- send_to = " email@gmail.com" )
68
+ (" gmail" , " password" ),
69
+ send_to = " email@gmail.com" )
68
70
```
69
71
70
- ###### Optional Parameters
72
+ ###### Other Parameters
71
73
``` python
72
74
# add a subject line to the message
73
75
notify.send_message(subject = " EMERGENCY" ,
74
- message = " No sweets detected in fridge!" )
76
+ message = " No sweets detected in fridge!" )
75
77
76
78
# add a file attachment (69 file types supported)
77
79
notify.send_message(subject = " I found it" ,
78
- message = " My dream car" ,
79
- file_attachment = " /path/car.png" )
80
+ message = " My dream car" ,
81
+ file_attachment = " /path/car.png" )
80
82
81
83
# run without blocking main thread
82
84
notify.send_message(" Hello World!" ,
83
- threaded = True )
85
+ threaded = True )
86
+
87
+ # you can re-order any of the parameters
88
+ notify.send_message(threaded = True ,
89
+ file_attachment = " /path/to/file"
90
+ phone_number = " your_number" ,
91
+ phone_provider = " your_phone_provider" ,
92
+ send_to = " email@gmail.com" ,
93
+ sender_credentials = (" gmail" , " password" ),
94
+ message = " No sweets detected in fridge!" )
84
95
```
85
96
86
97
###### List of Phone Providers
0 commit comments