Skip to content

Commit c6d0b55

Browse files
committed
Fix documentation on adding to addresses
1 parent 25566fb commit c6d0b55

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ alias SendGrid.{Mailer, Email}
4848
email =
4949
Email.build()
5050
|> Email.put_from("test@email.com")
51-
|> Email.put_to("test2@email.com")
51+
|> Email.add_to("test2@email.com")
5252
|> Email.put_subject("Hello From Elixir")
5353
|> Email.put_text("Sent from Elixir!")
5454

@@ -63,7 +63,7 @@ alias SendGrid.{Mailer, Email}
6363
email =
6464
Email.build()
6565
|> Email.put_from("test@email.com")
66-
|> Email.put_to("test2@email.com")
66+
|> Email.add_to("test2@email.com")
6767
|> Email.put_subject("Hello From Elixir")
6868
|> Email.put_html("<html><body><p>Sent from Elixir!</p></body></html>")
6969

lib/sendgrid/email.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule SendGrid.Email do
33
Email primitive for composing emails with SendGrid's API.
44
55
Email.build()
6-
|> Email.put_to("test@email.com")
6+
|> Email.add_to("test@email.com")
77
|> Email.put_from("test2@email.com")
88
|> Email.put_subject("Hello from Elixir")
99
|> Email.put_text("Sent with Elixir")

lib/sendgrid/mailer.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ defmodule SendGrid.Mailer do
1919
2020
email =
2121
Email.build()
22-
|> Email.put_to("test@email.com")
22+
|> Email.add_to("test@email.com")
2323
|> Email.put_from("test2@email.com")
2424
|> Email.put_subject("Hello from Elixir")
2525
|> Email.put_text("Sent with Elixir")

0 commit comments

Comments
 (0)