Fixed
Status Update
Comments
jk...@gmail.com <jk...@gmail.com> #2
To clarify, do you want to change the display name or the display name and the actual from email address?
You can change the from display name by using the 'name' advanced argument:http://code.google.com/googleapps/appsscript/class_mailapp.html#sendEmail
You can change the from display name by using the 'name' advanced argument:
hg...@gmail.com <hg...@gmail.com> #3
No, I want to change the actual email address, the way gmail does.
I know the 'name' and 'replyTo' advanced arguments and I'm workarounding with them now.
Since gmail has this feature, I thought it would be an easy change.
I know the 'name' and 'replyTo' advanced arguments and I'm workarounding with them now.
Since gmail has this feature, I thought it would be an easy change.
da...@gmail.com <da...@gmail.com> #4
I am looking for the same ability to change the "from" email address.
te...@gmail.com <te...@gmail.com> #5
this would be a handy feature indeed. Another approach may be to pick up on the "reply to" feature in account settings.
ga...@gmail.com <ga...@gmail.com> #6
my vote for change "From" field
ev...@google.com <ev...@google.com> #7
We definitely won't let you arbitrarily set the 'from' field, but if you've got multiple email addresses attached to your google account, we will try to let you pick an alternative,
Evin
Evin
hg...@gmail.com <hg...@gmail.com> #8
Yes, we're not asking to set the 'from' arbitrarily, just the addresses already authorized in gmail.
bo...@gmail.com <bo...@gmail.com> #9
Is there any improvement on this feature. I urgently need it.
po...@gmail.com <po...@gmail.com> #10
Need this as well...any updates?
[Deleted User] <[Deleted User]> #11
I need this badly as well. I have a primary and secondary domains in my account, and I always use the secondary domain. MailApp.sendEmail only allows me to send using my primary domain. Any news on this?
[Deleted User] <[Deleted User]> #12
The issue I have is similar. I have a form that collects the user account information from the user submitting the form. I then have a script that takes the data submitted in the form and uses MailApp.sendEmail to send that information to a helpdesk. The problem is that every time the email is sent it looks like it is coming from me since I am the owner of the form. I need it to come from the person submitting the form. In order to resolve this I either need to be able to change thr from: on the sendEmail or notifications need to be able to send the content of the form not just a link.
ke...@gmail.com <ke...@gmail.com> #13
I have the same problem. I really need to send mail from another address already authorized in gmail. Any updates?
a....@gmail.com <a....@gmail.com> #14
Yes, it would be very valuable to be able to send emails form all accounts registered with gmail. Any progress on this matter?
pa...@gmail.com <pa...@gmail.com> #15
Hi - has anything been done regard this issue? I am wanting to use an alias to send notification emails and I know that Google were looking into this?
bj...@gmail.com <bj...@gmail.com> #16
Same here...it would be very helpful to have this feature somewhere, I can't figure out a way to do it with outlook either once you add in the mail merge component.
fr...@gmail.com <fr...@gmail.com> #18
I need this feature also. I'm building a "Gmail Send later" Google Apps script, but it doesn't (fully) work because I can't set the from address to one of the registered accounts. :(
w....@continentalamericasrc.com <w....@continentalamericasrc.com> #19
has there been any movement on this? it would be a very useful feature.
jk...@google.com <jk...@google.com>
ju...@gmail.com <ju...@gmail.com> #20
Pleeeeease do this.
cl...@gmail.com <cl...@gmail.com> #21
Same here. This feature is needed indeed.
Would be great if this gets implemented any time soon ;)
Would be great if this gets implemented any time soon ;)
jo...@gmail.com <jo...@gmail.com> #22
I would really like this feature as well!
jo...@gmail.com <jo...@gmail.com> #23
Are there any workarounds people know of?
Can this please be raised in priority? This bug rpeort is getting pretty old but all the settings already exist, this is just a matter of explosing the option in the advancedArgs parameters.
I'm gussing Mail Merge users and scripting users tend to be advanced users. Seems like an "lay up" to make this group happy and more productive. Thanks.
Can this please be raised in priority? This bug rpeort is getting pretty old but all the settings already exist, this is just a matter of explosing the option in the advancedArgs parameters.
I'm gussing Mail Merge users and scripting users tend to be advanced users. Seems like an "lay up" to make this group happy and more productive. Thanks.
jy...@gmail.com <jy...@gmail.com> #24
I have the same problem. How difficult this could be to solve?
az...@cornell.edu <az...@cornell.edu> #25
I would really need this as well. I can't see why Google would not allow users to change the from field assuming that the from would be selected from one of the authorized accounts. This should also be easy to implement since Google already does the same "piece of code" when you select the account you want it to send from when you send emails using Gmail already. This should be added as soon as possible -- as we can see there is a big need in just this thread, but I bet there are many more people out there who would want this added.
[Deleted User] <[Deleted User]> #26
Another vote from a another frustrated user. I had an 'elancer' write a script for me for an auto email on form submit and it goes out with their email address as the sender I want/need it to be from the spreadsheet owner.
Many thanks
AP
Many thanks
AP
hg...@gmail.com <hg...@gmail.com> #27
Sorry, but this is not the problem this issue is going to solve.
To send the emails with the spreadsheet owner just set up the "on form submit" trigger with this account.
The problem this issue proposes is to be able to send emails with the other registered accounts you have on your gmail. Can your 'elancer' send emails from his gmail using your address? This is a security concern, do you really think that should be allowed?
To send the emails with the spreadsheet owner just set up the "on form submit" trigger with this account.
The problem this issue proposes is to be able to send emails with the other registered accounts you have on your gmail. Can your 'elancer' send emails from his gmail using your address? This is a security concern, do you really think that should be allowed?
lo...@gmail.com <lo...@gmail.com> #28
I think there is a disconnect. Comment #29 is script specific issue and nothing to do with what this issue is requesting. The commenter of #29 to check the script and the setup to see why the mail is sent as the 'elancer'. Actually, by default the mails can only be sent as the spreadsheet owner at this time. Contact the elancer and ask if there is an issue.
hg...@gmail.com <hg...@gmail.com> #29
@logunv I think you have a miss-concept. The sender address has nothing to do with the spreadsheet or script owner. It is only related to the account that set up the trigger. If one log in with a total different account and set up the trigger with it, that's the email that's going to be used.
lo...@gmail.com <lo...@gmail.com> #30
@logunv
The issues list hides the email ids for some reason and your comment exposes it. I don't have any issues with that.
I think you have a miss-concept. The sender address has nothing to do with the spreadsheet or script owner.
I agree.
It is only related to the account that set up the trigger. If one log in with a total different account and set up the trigger with it, that's the email that's going to be used.
I agree with this as well.
I see that I used a wrong term "spreadsheet owner". I meant to say "whoever runs the script".
The issues list hides the email ids for some reason and your comment exposes it. I don't have any issues with that.
I think you have a miss-concept. The sender address has nothing to do with the spreadsheet or script owner.
I agree.
It is only related to the account that set up the trigger. If one log in with a total different account and set up the trigger with it, that's the email that's going to be used.
I agree with this as well.
I see that I used a wrong term "spreadsheet owner". I meant to say "whoever runs the script".
hg...@gmail.com <hg...@gmail.com> #31
Alright.
I'm very sorry about the id issue. Won't do it again. I'm glad that it, at least, is not a problem for you.
I'm very sorry about the id issue. Won't do it again. I'm glad that it, at least, is not a problem for you.
xi...@gmail.com <xi...@gmail.com> #32
I also want this function, please! much thanks!
si...@gmail.com <si...@gmail.com> #33
Any updates?
ke...@gmail.com <ke...@gmail.com> #34
Pretty please...
jy...@gmail.com <jy...@gmail.com> #35
I suppose Google should have solved the problem by now.!!!
Since 2010 37 comments.
Since 2010 37 comments.
[Deleted User] <[Deleted User]> #36
I would like this functionality as well: Set the from address as the logged in user, using the gadget. Is it possible to use Gmail APIs in Apps Script to send email as a the logged in user through SMTP?
[Deleted User] <[Deleted User]> #37
I agree this is crazy why isn't anyone addressing this simple request?
az...@cornell.edu <az...@cornell.edu> #38
I can't see why they aren't adding it. It should be quite simple and straightforward to implement this. This should have high priority given the number of people here and the simplicity of implementation.
dl...@aperian.com <dl...@aperian.com> #39
I would like this ability as well. Also, when using the replyTo advanced argument, it doesn't work if the email address is a group.
For example:
var emailAddress = agroup@mydomain.com // email is a group email
var SenderEmailAddy = e.values[7]; // get email address of form submitter
MailApp.sendEmail(emailAddress, subject, message, {htmlBody:htmlMessage, name:SenderEmailAddy, replyTo:SenderEmailAddy}); // email to DL
When the email is received and you hit REPLY, the To field is the group email, NOT the value in replyTo.
For example:
var emailAddress = agroup@mydomain.com // email is a group email
var SenderEmailAddy = e.values[7]; // get email address of form submitter
MailApp.sendEmail(emailAddress, subject, message, {htmlBody:htmlMessage, name:SenderEmailAddy, replyTo:SenderEmailAddy}); // email to DL
When the email is received and you hit REPLY, the To field is the group email, NOT the value in replyTo.
ka...@gmail.com <ka...@gmail.com> #40
I'll cast my vote as well. This would be very useful.
ch...@gmail.com <ch...@gmail.com> #41
I suppose Google should solve the problem is very useful for everyone use google script.
vi...@gmail.com <vi...@gmail.com> #42
I want the same feature. I badly need this feature to implement. I am eagerly waiting for this issue solve.
ed...@gmail.com <ed...@gmail.com> #43
NEED THIS FEATURE TODAY!!! PLEASE!
sc...@bryanp.com <sc...@bryanp.com> #44
Couldn't you make a standalone script and install a library reference from each account?
hg...@gmail.com <hg...@gmail.com> #45
This is a somewhat cumbersome and complicated workaround, specially if you consider that the other authorized email addresses on one's gmail may not even be Google accounts.
ep...@gmail.com <ep...@gmail.com> #46
Nearly two-and-a-half years and still not addressed. It shouldn't be this hard, folks.
ko...@tafs.co.jp <ko...@tafs.co.jp> #47
[Comment deleted]
ko...@tafs.co.jp <ko...@tafs.co.jp> #48
I need this feature to set group adrress to "from:" field.
even if this is for security reasons , To Specify a authorized domain email account to "from:" field should be allowed.
even if this is for security reasons , To Specify a authorized domain email account to "from:" field should be allowed.
ko...@gmail.com <ko...@gmail.com> #50
This is now possible as of the October 26th release:
https://developers.google.com/apps-script/release_notes#october_26_2012
Use GmailApp.getAliases() to determine the alternate emails you are allowed to send from, and use the advanced option "from" when calling GmailApp.sendEmail() and pass in one of those aliases.
Use GmailApp.getAliases() to determine the alternate emails you are allowed to send from, and use the advanced option "from" when calling GmailApp.sendEmail() and pass in one of those aliases.
[Deleted User] <[Deleted User]> #51
GmailApp.getAliases() is giving "We're sorry, a server error occurred. Please wait a bit and try again."
my code is below:
function testing()
{
var aliases=GmailApp.getAliases();
Logger.log(aliases.length);
}
Please help.
my code is below:
function testing()
{
var aliases=GmailApp.getAliases();
Logger.log(aliases.length);
}
Please help.
az...@cornell.edu <az...@cornell.edu> #52
function SendEmail(t,s,b,a,n,r,i) {
GmailApp.sendEmail(t,s,b,{from:GmailApp.getAliases()[i], attachments:a, htmlBody:b, name:n, replyTo:r});
}
/*Variable list
t = Recipient email address (String)
s = Subject line (String)
b = Body (Gmail Message Object [HTML] or String)
a = Attachment (Google ID or String)
n = Sender Name (String)
r = Reply-to email address
i = Number of the email alias: if you have one extra alias on top of your original, this number should be set to 0. If you have two, then either 0 or 1 depending on which one you want. (Integer)
*/
GmailApp.sendEmail(t,s,b,{from:GmailApp.getAliases()[i], attachments:a, htmlBody:b, name:n, replyTo:r});
}
/*Variable list
t = Recipient email address (String)
s = Subject line (String)
b = Body (Gmail Message Object [HTML] or String)
a = Attachment (Google ID or String)
n = Sender Name (String)
r = Reply-to email address
i = Number of the email alias: if you have one extra alias on top of your original, this number should be set to 0. If you have two, then either 0 or 1 depending on which one you want. (Integer)
*/
[Deleted User] <[Deleted User]> #53
Hey Thanks for your help,
But after I copied my code to another project, it gave the o/p. I think it may be because of some cache error.
Thanks a lot.
But after I copied my code to another project, it gave the o/p. I think it may be because of some cache error.
Thanks a lot.
go...@gmail.com <go...@gmail.com> #54
Is this supposed to be fixed? It sure doesn't seem to work for me!
Logger.log(GmailApp.getAliases()[1]);
Returns: "myalias@mydomain.be"
Yet when I send mail,it still sends it from my normal address:
MailApp.sendEmail("toaddress@abcde.be", "Automatische verzending", "Hallo",
{from:GmailApp.getAliases()[1]});
Is there something wrong with my syntax, or does this functionality not work?
Logger.log(GmailApp.getAliases()[1]);
Returns: "myalias@mydomain.be"
Yet when I send mail,it still sends it from my normal address:
MailApp.sendEmail("toaddress@abcde.be", "Automatische verzending", "Hallo",
{from:GmailApp.getAliases()[1]});
Is there something wrong with my syntax, or does this functionality not work?
jy...@gmail.com <jy...@gmail.com> #55
Try to use a variable
var mailFROM = GmailApp.getAliases()[1];
and then
GmailApp.sendEmail("toaddress@abcde.be", "Automatische verzending", "Hallo", {from:mailFROM });
var mailFROM = GmailApp.getAliases()[1];
and then
GmailApp.sendEmail("toaddress@abcde.be", "Automatische verzending", "Hallo", {from:mailFROM });
go...@gmail.com <go...@gmail.com> #56
No that does not work either. See screenshots. (I don't want to post real e-mail addresses as text here)
jy...@gmail.com <jy...@gmail.com> #57
You should not use MailApp.sendEmail() but GmailApp.sendEmail()
go...@gmail.com <go...@gmail.com> #58
Great, that works! How confusing though: GmailApp and MailApp!
dn...@gmail.com <dn...@gmail.com> #59
Gmail.sendEmail with from (alias) now works BUT when the user get the mail and REPLY, it still shows MY EMAIL and not the From email alias I sent as!!!
Shouldn't in the reply, it should be sending back to the from address?
Shouldn't in the reply, it should be sending back to the from address?
go...@gmail.com <go...@gmail.com> #60
Use replyTo:
{
from:mailfrom,
replyTo:mailfrom
}
{
from:mailfrom,
replyTo:mailfrom
}
dn...@gmail.com <dn...@gmail.com> #61
Reply to #64
In my gmail, i have created alias to a support mail box which I have been delegated. In google script, now I am able to sendEmail w/ the from:mailAlias and have it shows are coming from the support mail box.
In my testing, I used it to send to myself but when I reply, it doesn't show the support mail box but my email (I guess this is a feature from gmail). I just tested to a totally separate email and it seems to be working (showing the support box in the reply).
Thanks
In my gmail, i have created alias to a support mail box which I have been delegated. In google script, now I am able to sendEmail w/ the from:mailAlias and have it shows are coming from the support mail box.
In my testing, I used it to send to myself but when I reply, it doesn't show the support mail box but my email (I guess this is a feature from gmail). I just tested to a totally separate email and it seems to be working (showing the support box in the reply).
Thanks
[Deleted User] <[Deleted User]> #62
I having the problem as well.
Use replyTo can help sent email from my delegated gmail accout:
{
from:mailfrom,
replyTo:mailfrom
}
Here is another problem, those emails are not capture in my delegated account's outbox, but it capture in my gmail accout.
Do you have other method can solve this ? Thanks
Use replyTo can help sent email from my delegated gmail accout:
{
from:mailfrom,
replyTo:mailfrom
}
Here is another problem, those emails are not capture in my delegated account's outbox, but it capture in my gmail accout.
Do you have other method can solve this ? Thanks
ak...@gmail.com <ak...@gmail.com> #63
no solution yet for from attribute in MailApp.SendEmail function. I don't understand if it doesn't work why you show it as attribute? I have to use GmailApp.SendEmail function to use from attribute and it adds one more thing to permission :(
da...@zigmens.com <da...@zigmens.com> #64
when I use:
var var Username = sheet.getRange(row, getColIndexByName("Username")).getValue();
GmailApp.sendEmail(recipient, subject, body, {from:Username, replyTo:Username});
This only works when I do it myself. Otherwise I get a an error
Invalid argument: fred.simpson@traxtech.com (line 13, file "emailNotification")
var var Username = sheet.getRange(row, getColIndexByName("Username")).getValue();
GmailApp.sendEmail(recipient, subject, body, {from:Username, replyTo:Username});
This only works when I do it myself. Otherwise I get a an error
Invalid argument: fred.simpson@traxtech.com (line 13, file "emailNotification")
az...@cornell.edu <az...@cornell.edu> #65
You can't just enter a string for the from address, you can only select from accounts you already have logged in via Gmail. So if you are concurrently logged in under 3 Gmail accounts, you will selected between [0-2] in the index for the various from addresses. The start of the index, 0, is your primary Gmail account. This functionality was never intended to be an open box from address where you can set the from address.
br...@gmail.com <br...@gmail.com> #66
I want my From address to be a DoNotReply type of address. I don't want my customers to be able to see or reply to my personal gmail account, is this possible?
Thanks
Thanks
ch...@exosphereapps.com <ch...@exosphereapps.com> #67
essentially the 'from:' parameter is ignored is that correct? Even when I use an alias on my gmail for apps account i.e. I have the 'right' to send from this email address the from address will be the logged in user - is this correct? If so this isn't great
[Deleted User] <[Deleted User]> #68
[Comment deleted]
[Deleted User] <[Deleted User]> #69
I would like this ability as well
en...@gmail.com <en...@gmail.com> #70
I need this feature as well.
ko...@gmail.com <ko...@gmail.com> #71
As per update 54 this feature has already been added. I'm preventing further comments on this issue. If you have problems with the current implementation please open a new issue.
jo...@essilor.com <jo...@essilor.com> #72
Hello,
It seems my mail sent with the use of mailapp.send() doesn't appear in the inbox of my recipients, but I can see that I already sent it.
My domain is @essilor.com , is it the reason why? because it is private, help me please , thanks
It seems my mail sent with the use of mailapp.send() doesn't appear in the inbox of my recipients, but I can see that I already sent it.
My domain is @
ca...@gmail.com <ca...@gmail.com> #73
Good night.
I try this code, and works well, it sends the email with the account i need:
var aliases = GmailApp.getAliases();
var Mailfrom = aliases[0];
GmailApp.sendEmail("email@gmail.com",'From an alias', 'A message from an alias!', {'from': Mailfrom });
On the other hand i have a code that sends images: (Works well)
var correo = "email@gmail.com";
var copia = "copymail@gmail.com"
var logo = DriveApp.getFileById(AxId).getBlob();
var fileID = PropertiesService.getScriptProperties().getProperty('IFILE');
var img = DriveApp.getFileById(fileID).getBlob();
MailApp.sendEmail({to: correo,cc: copia,subject: asunto,htmlBody: cuerpo,inlineImages:{Axlogo: logo, Evidencia: img}})
What i want is to join both options, i try this:
MailApp.sendEmail({to: correo,cc: copia,subject: asunto,htmlBody: cuerpo,inlineImages:{Axlogo: logo, Evidencia: img}},{'from': Mailfrom }) (Web console shows: uncaught)
MailApp.sendEmail({to: correo,cc: copia,subject: asunto,htmlBody: cuerpo,inlineImages:{Axlogo: logo, Evidencia: img},{'from': Mailfrom }}) (Programing window shows: invalid property ID)
How should i write the options to send the mail with the "from" option and the option of the images "inlineImages"
Thanks
I try this code, and works well, it sends the email with the account i need:
var aliases = GmailApp.getAliases();
var Mailfrom = aliases[0];
GmailApp.sendEmail("email@gmail.com",'From an alias', 'A message from an alias!', {'from': Mailfrom });
On the other hand i have a code that sends images: (Works well)
var correo = "email@gmail.com";
var copia = "copymail@gmail.com"
var logo = DriveApp.getFileById(AxId).getBlob();
var fileID = PropertiesService.getScriptProperties().getProperty('IFILE');
var img = DriveApp.getFileById(fileID).getBlob();
MailApp.sendEmail({to: correo,cc: copia,subject: asunto,htmlBody: cuerpo,inlineImages:{Axlogo: logo, Evidencia: img}})
What i want is to join both options, i try this:
MailApp.sendEmail({to: correo,cc: copia,subject: asunto,htmlBody: cuerpo,inlineImages:{Axlogo: logo, Evidencia: img}},{'from': Mailfrom }) (Web console shows: uncaught)
MailApp.sendEmail({to: correo,cc: copia,subject: asunto,htmlBody: cuerpo,inlineImages:{Axlogo: logo, Evidencia: img},{'from': Mailfrom }}) (Programing window shows: invalid property ID)
How should i write the options to send the mail with the "from" option and the option of the images "inlineImages"
Thanks
aq...@senda.gob.cl <aq...@senda.gob.cl> #74
acá envÃo correos desde un alias que tengo asignado, en estos correos hay adjuntos e imágenes en el html
var Mailfrom = "alias@gob.cl" // este es el alias
var adjuntos = [];
var file = DriveApp.getFileById('idArchivo');
adjuntos.push(file.getAs(MimeType.PDF));
var fileImage = DriveApp.getFileById('IdImagen');
GmailApp.sendEmail('maildestino@gob.cl', 'Entrega de certificados Operación Renta', '', {
htmlBody: 'formato html con etiqueta cid: imageLogo',
from: Mailfrom,
name: 'querido NOMBRE DEL DESTINATARIO',
attachments: adjuntos,
inlineImages:
{
imageLogo: fileImage.getBlob()
}
});
//no olvides ejecutar la app para que solicite permisos de envÃo desde GMAIL
var Mailfrom = "alias@gob.cl" // este es el alias
var adjuntos = [];
var file = DriveApp.getFileById('idArchivo');
adjuntos.push(file.getAs(MimeType.PDF));
var fileImage = DriveApp.getFileById('IdImagen');
GmailApp.sendEmail('maildestino@gob.cl', 'Entrega de certificados Operación Renta', '', {
htmlBody: 'formato html con etiqueta cid: imageLogo',
from: Mailfrom,
name: 'querido NOMBRE DEL DESTINATARIO',
attachments: adjuntos,
inlineImages:
{
imageLogo: fileImage.getBlob()
}
});
//no olvides ejecutar la app para que solicite permisos de envÃo desde GMAIL
Description
Today in MailApp.sendMail function there is no way to change the 'from:' field.
If a user has multiple accounts set in his gmail he can easily change the 'from:' field when composing new mails.
This could be an argument in 'Advanced Arguments' field, which will not even break any existing code.
Notes:
If this is difficult to implement, GAS should at least use the default 'Send mail as' option configured in the users account.