You should at least explain what you can't do and state where.
How about listing what device you are using at the very least?
Gmail is:
SMTP server = smtp.gmail.com
Port is 587
Encryption is STARTTLS
login name is the email address
Password is to the email address account.
All those settings go into the machine via it's web page. But since you didn't bother explaining the model of printer, I can;'t give details on that. And since gmail issues have been sorted for just about every model Xerox has made in the last 5-10 years right here on this forum with screenshots included, I assume also you haven't searched this forum for the word Gmail, since you would then either know how to fix it, or at least would know to explain why yours doesn't work, or at what point you got before you stopped trying and came to a forum.