I think it's pretty obvious that intent matters, since morality (at least to me) means acting in accordance with feelings and ideas about a more perfect social world.
For example, let's say I donate money to a woman's shelter because I'm hoping to impress a woman into having sex with me. While donating to help people in need is generally moral, it's moral because I'm acting on a principle of goodwiill. If I'm doing it to take advantage of someone's psychological state (feeling men are cruel and uncaring and being grateful when a man seems to show compassion) is clearly immoral.
For example, let's say I donate money to a woman's shelter because I'm hoping to impress a woman into having sex with me. While donating to help people in need is generally moral, it's moral because I'm acting on a principle of goodwiill. If I'm doing it to take advantage of someone's psychological state (feeling men are cruel and uncaring and being grateful when a man seems to show compassion) is clearly immoral.