how to send email in flutter | flutter emial sender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] so how to send the email inflator first of all we have to go to the pubspec.yaml file and we have to add here the flutter email center the latest version that you can see on the web on the dart package after this we have to make one more thing let's go to the android then go to the source then go to the main and then we have to go to the android manifest and need to give the permission so that's the permissions that the qre intent and the android name are the action sent to and the scheme should be the mail tool after this when you apply this query when you apply these lines in the manifest then we have to go to the main.dart file and here i have built some code home at the home page and the home page i have a scaffold and the padding and the column and the text field the second actually the third texture and the elevated button okay after this what we have to do we have to create here a key as a global key in the form state okay and then we have to wrap that column with the widget okay so uh before wrapping the column with the widget let's create a function here so uh first of all we are creating the function as send email with the parameter as a subject and the body and the recipient email after this we have to create here this email object with the email constructor which needs some arguments the first one is the body as a body that we are putting here the subject that's coming from here and the recipient email that's that i have put here in this way then we can also apply the cc or the bcc but the attached part that you can send and then you can also apply the html coding here just like the html tags just like this one and then i'm just putting here the faults for now and then i'm putting here a bit flutter email sender dot send email perfect don't uh forget to call the package at the letter email standard as a letter email sender.that we have used here in pubspec.yaml file after this what i am going to do here going to wrap that column with a widget as a form then going to put here the key and as a key that we have created here after this we have to use what we have to do we have to create a string ah i we need to get here the text editing controller named as email equal to text editing controller going to paste it again putting here the subject putting here the body now let's go to the text field and putting here we have to use the text form field text form field here also and text form field here also now because we are using the form now now putting here the controller has a email here again controller with the subject and then here again with the controller as a body after this let's go here and what we need to do we need to put here our key dot current state dot validate i think so we have we cannot put the save also now let's count here the dollar sign email dot email let me call here using this three [Music] let's enter some data here just like one one one one and now send email you can see the one one one button here now what we have to do we have to call our send email function which need a subject so subject could be the subject dot text as our controller body as a body dot text and the recipient is the email from the text so when we apply this one let's write something here let me put here the email as a with gmail.com subject testing and party hi this is a test email now let's click on this send email button so after some time you will see here it's the email form and for now i have the same form and two testing as the subject and the body as this one now we can send it here and after some time you will see the notification here
Info
Channel: Just Flutter
Views: 9,102
Rating: undefined out of 5
Keywords: how to send email in flutter, flutter, flutter tutorial, gmail, mail send with flutter
Id: ZRh2MqK36Qc
Channel Id: undefined
Length: 5min 52sec (352 seconds)
Published: Sun Sep 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.